How to solve this problem?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:18:34
Original
828 people have browsed it








I want to set different background images for the two TDs of this table. How should I write it?


Reply to discussion (solution)

.td1{background:url(images/tab1.gif) 0 0 repeat-x;}.td2{background:url(images/tab2.gif) 0 0 repeat-x;}
Copy after login

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>
Copy after login
try or
.td1{  background:url('images/img1.jpg');}.td2{  background:url('images/img2.jpg');}
Copy after login

The 10th floor should be fine

CSS code?12 Try or
Delphi/Pascal code?123456.td1{ background:url('images/img1.jpg');...... Haha

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template