西班牙国旗采用了红黄红三色条纹设计,其中黄条为中间条纹,它的比例是2:3:2。在CSS中,可以通过background-color和linear-gradient两种方式实现西班牙国旗的设计。使用ba
p { width: 200px; height: 120px; background-color: red; background-image: linear-gradient(to bottom, yellow 40%, red 40%, red 60%, yellow 60%); }
p { width: 200px; height: 120px; background-image: linear-gradient(to bottom, red 0 33.33%, yellow 0 33.34% 66.66%, red 0 66.67%); }
粉丝
0
关注
0
收藏
0