Difference between revisions of "Template:CIEI-China"

Line 11: Line 11:
 
     <script src="https://2017.igem.org/Team:CIEI-China/js/bootstrap?action=raw&ctype=text/javascript"></script>
 
     <script src="https://2017.igem.org/Team:CIEI-China/js/bootstrap?action=raw&ctype=text/javascript"></script>
 
          <style>
 
          <style>
        #myleft{
 
            float: left;
 
            width: 170px;
 
        }
 
 
 
         #left-fix{
 
         #left-fix{
 
             position: fixed;
 
             position: fixed;
            top: 150px;
+
float: left;
            left: 5px;
+
margin: 150px 0 0 5px;
             width: 160px; background-color: #cccccc;  
+
             width: 160px;  
 +
background-color: #cccccc;  
 
         }
 
         }
  
Line 30: Line 26:
 
   #mycontent {
 
   #mycontent {
 
     padding-top: 20px;
 
     padding-top: 20px;
     padding-left: 180px;
+
     padding-bottom: 30px;
     padding-right: 30px;
+
     margin-left: 180px;
    display: block;
+
    width: availWidth;
+
 
   }
 
   }
  
Line 76: Line 70:
 
</head>
 
</head>
 
<body>
 
<body>
<script type="text/javascript">
 
            < !--
 
            var winWidth = 0;
 
            var winHeight = 0;
 
            function findDimensions() //函数:获取尺寸
 
            {
 
                //获取窗口宽度
 
                if (window.innerWidth) winWidth = window.innerWidth;
 
                else if ((document.body) && (document.body.clientWidth)) winWidth = document.body.clientWidth;
 
                //获取窗口高度
 
                if (window.innerHeight) winHeight = window.innerHeight;
 
                else if ((document.body) && (document.body.clientHeight)) winHeight = document.body.clientHeight;
 
                //通过深入Document内部对body进行检测,获取窗口大小
 
                if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth) {
 
                    winHeight = document.documentElement.clientHeight;
 
                    winWidth = document.documentElement.clientWidth;
 
                }
 
                //结果输出至两个文本框
 
                document.form1.availHeight.value = winHeight;
 
                document.form1.availWidth.value = winWidth;
 
            }
 
            findDimensions();
 
            //调用函数,获取数值
 
            window.onresize = findDimensions;
 
            //-->
 
        </script>
 
  
 
<div id="myleft">
 
<div id="myleft">

Revision as of 13:40, 3 October 2017

Bootstrap 101 Template