为什么元素的高度和宽度与CSS中指定的不同?
为什么元素的高度和宽度与CSS中指定的不同 这是指向JSFIDLE的链接 相同的代码被复制粘贴在这里 HTML为什么元素的高度和宽度与CSS中指定的不同?,css,Css,为什么元素的高度和宽度与CSS中指定的不同 这是指向JSFIDLE的链接 相同的代码被复制粘贴在这里 HTML <!DOCTYPE html> <html> <body> <div id="target"> <p>Click here set promise as Done!</p> </div> <br/> <div id="reset" ><p>Reset<
<!DOCTYPE html>
<html>
<body>
<div id="target">
<p>Click here set promise as Done!</p>
</div>
<br/>
<div id="reset" ><p>Reset</p></div>
</body>
</html>
添加“px”->
width:200px;
height:200px;
添加“px”->
width:200px;
height:200px;
您需要为CSS中的任何测量值指定单位(px,em,%):
#target {
width:200px;
height:200px;
background-color:yellow;
}
您需要为CSS中的任何测量值指定单位(px,em,%):
#target {
width:200px;
height:200px;
background-color:yellow;
}