CSS layout
You can refer to some large websites
Take a good look at the layout part of css ``~
Take a good look at the layout part of css ``~
I know layout, but it’s very troublesome. I need text and text under the picture. price. . .
<style type="text/css"> <!-- body{font-size:13px;}#products li { float:left; margin-left:5px; display:inline; border:solid 1px blue;} #products li a img { border:1px solid #666; padding:1px; width:121; height:158;} #products span {display:block; text-align:center;padding:0.3em;height:13px;}--> </style> <ul id="products" style="border:solid 1px red;width:750px"> <li> <a href="#"><img src="141044911.gif" ></a> <span><a href="#">品名</a></span> <span>规格</span> <span>会员价:20元</span> </li> <li> <a href="#"><img src="141044911.gif" ></a> <span><a href="#">品名</a></span> <span>规格</span> <span>会员价:20元</span> </li> <li> <a href="#"><img src="141044911.gif" ></a> <span><a href="#">品名</a></span> <span>会员价:20元</span> <span></span> </li> <li> <a href="#"><img src="141044911.gif" ></a> <span><a href="#">品名</a></span> <span>规格</span> <span>会员价:20元</span> </li> <li> <a href="#"><img src="141044911.gif" ></a> <span><a href="#">品名</a></span> <span>规格</span> <span>会员价:20元</span> </li> </ul>
Take a good look at the layout part of css~
I know layout, that’s it It’s very troublesome, there are text and price below the picture. . .
It’s the same, that is the layout of a small div, write it slowly, you will understand it after you finish it~