屬性設(shè)置失敗,問題在哪呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>盒子模型練習(xí)題</title>
<style>
.myBox{
width:200px;
height:100px;
border:1px solid red;
margin-top:10px;
padding-left:15px;
}
</style>
</head>
<body>
<div class="myBox">Hello World!</div>
</body>
</html>
2017-07-05
你的問題是你的 符號(hào)錯(cuò)了,你的width后面的冒號(hào)是中文冒號(hào),你去改成英文冒號(hào)就可以了
2017-07-05
width:200px;
height:100px;
這個(gè)中間的冒號(hào)錯(cuò)了,英文狀態(tài)下的冒號(hào)才能識(shí)別,換過來(lái)就好了
2017-07-05
width:200px;
height:100px;
改為
width:200px;
height:100px;