第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

老濕是如何實(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">
? ? ?&nbsp;<a class="abs ml10 mt30"></a>
? ?</div>
?</div>
</body>

這樣寫還是會(huì)跟隨的趕腳

正在回答

1 回答

content外面加一層設(shè)置高度,出現(xiàn)滾動(dòng)條就ok了

<style>
????.warp?{?height:300px;?overflow-y:auto;}
????.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>
<body>
<div?class="warp">
?<div?class="content">
???<div?class="h0?ovh?tr">
?????&nbsp;<a?class="abs?ml10?mt30"></a>
???</div>
?</div>
</div>
</body>


2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉3830774 提問者

good,非常感謝!
2016-08-26 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕少7532173

直接將position:absolute改為fixed也可以實(shí)現(xiàn)固定。請(qǐng)問上面的解決方法在外面套一層.wrap為何就可以實(shí)現(xiàn)固定了呢?
2016-10-20 回復(fù) 有任何疑惑可以回復(fù)我~
#3

qq_巴薩最強(qiáng)_03768458 回復(fù) 慕少7532173

wrap固定了高度和滾動(dòng)條,里面內(nèi)容只能在wrap里面活動(dòng)了
2016-10-21 回復(fù) 有任何疑惑可以回復(fù)我~
#4

喋喋呀

這個(gè)絕對(duì)定位塊它的包含塊到底是哪個(gè)
2016-10-28 回復(fù) 有任何疑惑可以回復(fù)我~
查看1條回復(fù)

舉報(bào)

0/150
提交
取消

老濕是如何實(shí)現(xiàn)absolute元素表現(xiàn)為fixed的?百思不得其解啊

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)