文章出處

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<body>
<style>
.percent100{
    width:100%;
}
.center{
    height:100px;
    background:#f00;
    width:1000px;
    margin:0 auto;
}
.body{
    width:2000px;
}
</style>
<div class="percent100">
    <div class="center">
        sfsdfsd
        //你看,因為這個的父級是100%的布局,內部的寬度溢出到父級外面,如果出現滾動條(下面的寬度有可能很寬,所以會出現滾動條咯,所以..),這個父級的100%寬度只有頁面用戶寬度那么寬,,懂不懂。。
    </div>
</div>
<div class="body">
sdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf
</div>
</body>
</html>

 


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()