Home >Web Front-end >HTML Tutorial >I have a little question about the layout of the pictures! _html/css_WEB-ITnose

I have a little question about the layout of the pictures! _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:22:291229browse

CSS layout


How to write a similar typesetting layout using DIV CSS? My method is too troublesome. I don’t want to use it for forms~ Is there any suitable method...

Reply to the discussion (solution)

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> 


Change the picture yourself and see the effect


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~

Statement:
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