开发者

Where to use quotes?

开发者 https://www.devze.com 2022-12-31 16:52 出处:网络
Where and how should quotes be used in CSS? width: 150px;开发者_运维问答 /* or */ width: \"150px\";

Where and how should quotes be used in CSS?

width: 150px;        开发者_运维问答 /* or */ width: "150px";
height: 50%;          /* or */ height: "50%";
font-family: Verdana; /* or */ font-family: "Verdana";


You only need to use quotes if the property value has spaces in it. In practice, I think the only cases in which this is likely to come up are font names and URLs.

Example:

font-family: "DejaVu Sans", sans-serif;
0

精彩评论

暂无评论...
验证码 换一张
取 消