[問題] CSS的background-color
小弟想請問一個問題
CSS的background-color是不是要放在每個class或id的最後一行的規定呢?
例:
01: #test1 {
02: position: relative;
03: background-color: #008080 /*Color-selector: Teal*/
04: height: 500px;
05: margin-top: 26px;
06: }
07:
08: #test2 {
09: position: relative;
10: height: 500px;
11: margin-top: 26px;
12: background-color: #008080 /*Color-selector: Teal*/
13: }
a.因為我的test1一直顯現不出我樣的顏色(#008080),所以我嘗試了test2
b.我的test2可以顯示出我要的顏色
c.test1和test2只有差在 line 03 那行屬於test1的background-color不在末端,
而 line 12 那行屬於test2的background-color位在末端。
d.我會問是因為google過後好像沒有「明確」規定background-color的宣告位置...
e.請問大家有甚麼建議嗎?
初學&自學css的我...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.84.63.251
→
03/13 12:58, , 1F
03/13 12:58, 1F
→
03/13 13:10, , 2F
03/13 13:10, 2F
推
03/13 14:39, , 3F
03/13 14:39, 3F
→
03/13 16:11, , 4F
03/13 16:11, 4F
推
03/13 19:16, , 5F
03/13 19:16, 5F
→
03/13 19:16, , 6F
03/13 19:16, 6F