英 [w?dθ]? ?美 [w?dθ, w?θ, w?tθ]??

n.寬度;廣度

復(fù)數(shù): widths

css width屬性 語(yǔ)法

作用:設(shè)置元素的寬度。

說(shuō)明:這個(gè)屬性定義元素內(nèi)容區(qū)的寬度,在內(nèi)容區(qū)外面可以增加內(nèi)邊距、邊框和外邊距。行內(nèi)非替換元素會(huì)忽略這個(gè)屬性。

注釋:所有主流瀏覽器都支持 width 屬性。

css width屬性 示例

<html>
<head>
<style type="text/css">
img
{
width: 300px
}
</style>
</head>
<body>

<img src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例