老濕是如何實(shí)現(xiàn)absolute元素表現(xiàn)為fixed的?百思不得其解啊
<style>
? ?.content { width: 60%; height: 2000px; background: #999; margin: 0 auto;}
? ?.h0 { height: 0;}
? ?.ovh { overflow: hidden;}
? ?.tr { text-align: right;}
? ?.abs { position: absolute; width: 20px; height: 20px; background: #F00;}
? ?.ml10 { margin-left: 10px;}
? ?.mt30 { margin-top: 30px;}
?</style>
?</head>
<body>
?<div class="content">
? ?<div class="h0 ovh tr">
? ? ? <a class="abs ml10 mt30"></a>
? ?</div>
?</div>
</body>
這樣寫還是會(huì)跟隨的趕腳
2016-08-25
content外面加一層設(shè)置高度,出現(xiàn)滾動(dòng)條就ok了