2
在哪里以及如何在CSS中使用引号?在哪里使用报价?
width: 150px; /* or */ width: "150px";
height: 50%; /* or */ height: "50%";
font-family: Verdana; /* or */ font-family: "Verdana";
在哪里以及如何在CSS中使用引号?在哪里使用报价?
width: 150px; /* or */ width: "150px";
height: 50%; /* or */ height: "50%";
font-family: Verdana; /* or */ font-family: "Verdana";
如果属性值中有空格,则只需使用引号。实际上,我认为可能出现的唯一情况是字体名称和URL。
例子:
font-family: "DejaVu Sans", sans-serif;
url中,没有必要http://stackoverflow.com/questions/2034575/which-type-of-quotes-we-should-use-in-css-background-url - 单双层/ 2034587#2034587 – 2010-05-25 01:48:23