1為什么不能使用body標(biāo)簽將a,span,em,strong轉(zhuǎn)換成block?
為什么不能使用body標(biāo)簽將a,span,em,strong轉(zhuǎn)換成block?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>流動模式下的內(nèi)聯(lián)元素</title>
<style type="text/css">
a{text-decoration:none;}
body{display:block;}
</style>
</head>
<body>
? ?<a href="http://yifanck.cn">yifanck.cn</a><span>強調(diào)</span><em>重點</em>
? ?<strong>強調(diào)</strong>
</body>
</html>
另外最近的提問中,截圖打開是空白?求
解。
2016-04-04
body作為一個權(quán)重最高的父輩標(biāo)簽,如果直接使用body來設(shè)置塊狀元素,會影響到整個頁面的布局,所以,HTML應(yīng)該也是禁止了這種設(shè)置。
2016-04-04
同意樓上