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

為了賬號安全,請及時綁定郵箱和手機立即綁定

background-origin篇

<!DOCTYPE?html>
<html>
<head>?
<meta?charset="utf-8">
<title>背景原點</title>
<style?type="text/css">
.wrap?{
????width:220px;?
????border:20px?dashed?#000;?
????padding:20px;?
????font-weight:bold;?
????color:#000;?
????background:#ccc?url(http://static.mukewang.com/static/img/logo_index.png)?no-repeat;?
????background-origin:?content-box;
????position:?relative;
}
.wrap?span?{?
????position:?absolute;?
????left:0;?
????top:0;
}
.content?{
????height:80px;?
????border:1px?solid?#333;
}

</style>??
</head>?
<body>
<div?class="wrap"><span>padding</span>
????<div?class="content">content</div>
</div>
<br/>
</div>
</body>
</html>

.content 未設(shè)置width,為什么他有160px左右的寬度

正在回答

2 回答

.content ?是在div上的,div是一個塊級元素,塊級元素不設(shè)置寬度,默認(rèn)就是父級元素的寬度,所以他有他的父級元素的內(nèi)寬度就是220px ?

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

qq_霸王處秀_0 提問者

非常感謝!
2015-12-07 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

background-origin篇

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

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

幫助反饋 APP下載

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

公眾號

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