css div inline內聯 (行元素)和塊狀元素的轉化

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>inline內聯(行內元素)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="布爾教育 http://www.itbool.com" />
<style>
    #conn{
        color: red;
    }

</style>
</head>
    <body>
        離離原上草,一歲一<span id="conn">枯榮</span>
    </body>
</html>html



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>塊狀和內聯元素的轉化</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="布爾教育 http://www.itbool.com" />
<style>
span{
    width: 200px;
    height: 200px;
    background: blue;
    display:block;
}
div{
    width: 200px;
    height: 200px;
    background: black;
    display:inline;

}
</style>
</head>
    <body>
        <div>塊狀</div>
        <span>離離原上草</span>

    </body>
</html>ui

相關文章
相關標籤/搜索