Heim > Artikel > Web-Frontend > div 绝对定位_html/css_WEB-ITnose
div绝对居下
1 .Phone2title{ 2 width:100%; 3 height:30px; 4 line-height:30px; 5 /*text-align:left;*/ 6 /*background-color:RGB(239,101,25);*/ 7 background-color:#b81c22; 8 position:fixed; 9 _position:absolute; 10 *position:absolute; 11 top:0px;12 color:white; 13 font-size:18px;14 z-index:99999;15 /*border:1px blue solid;*/16 17 /*_top:expression(document.documentElement.clientHeight + document.documentElement.scrollTop - this.offsetHeight);*/ 18 vertical-align: middle;19 }
<div class="Phone2title"></div>
div绝对居上
1 .Phone2title{ 2 width:100%; 3 height:30px; 4 line-height:30px; 5 /*text-align:left;*/ 6 /*background-color:RGB(239,101,25);*/ 7 background-color:#b81c22; 8 position:fixed; 9 _position:absolute; 10 *position:absolute; 11 top:0px;12 color:white; 13 font-size:18px;14 z-index:99999;15 /*border:1px blue solid;*/16 17 /*_top:expression(document.documentElement.clientHeight + document.documentElement.scrollTop - this.offsetHeight);*/ 18 vertical-align: middle;19 }