Home > Article > Web Front-end > How to solve this problem?_html/css_WEB-ITnose
f5d188ed2c074f8b944552db028f98a1
a34de1251f0d9fe1e645927f19a896e8
ee022350775dc8d9aa2208dc491bef98b90dd5946f0946207856a8a37f441edf
5c2d4bd33cb4e2effe11c9a26cd82e53b90dd5946f0946207856a8a37f441edf
fd273fcf5bcad3dfdad3c41bd81ad3e5
f16b1740fad44fb09bfe928bcc527e08
I want to set different background images for the two TDs of this table. How should I write it?
.td1{background:url(images/tab1.gif) 0 0 repeat-x;}.td2{background:url(images/tab2.gif) 0 0 repeat-x;}
td.td1{
background-image:url(csxt.jpg);
}
td.td2{
background-image:url(1.jpg);
}
The answer has been given upstairs...
td.td1{
background-image:url(csxt.jpg);
}
td.td2{
background-image:url(1.jpg);
}
Tried, No
How could it not work? Is it not displayed? Fill in some data in the cell and see
CSS code?12.td1{background:url(images/tab1.gif) 0 0 repeat-x;}.td2{background:url(images/tab2.gif) 0 0 repeat-x;}
What do the two 0s in the background mean?
What do the two 0s in the background mean?
background-position
http://www.w3school.com.cn/css/pr_background.asp
Just add the background attribute to td1 td2
Often There will be path problems. It is recommended to use relative paths to obtain the image location
<td style="background:url('images/img1.jpg')"></td><td style="background:url('images/img2.jpg')"></td>try or
.td1{ background:url('images/img1.jpg');}.td2{ background:url('images/img2.jpg');}
The 10th floor should be fine
CSS code?12517007643fa375db89ddcbb85a442980b90dd5946f0946207856a8a37f441edf3772d49045707034c07b07126f12f2b2 b90dd5946f0946207856a8a37f441edfTry or
Delphi/Pascal code?123456.td1{ background:url('images/img1.jpg');...... Haha