html中怎么排列图片

html-css023

html中怎么排列图片,第1张

这个要看你是如何的排列方法了

如竖着排列

<div>

<img src = "1.png" alt="">

</div>

<div>

<img src = "2.png" alt="">

</div>

<div>

<img src = "3.png" alt="">

</div>

横着排列:

<div>

<img src = "1.png" alt="">

<img src = "2.png" alt="">

<img src = "3.png" alt="">

</div>

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>demo</title>

</head>

<body>

<style type="text/css">

html,body,ul{ margin:0padding:0}

li{ list-style:none}

.pic-list{ width:500pxheight:500pxmargin:200px auto}

.pic-list li{ width:100pxheight:100pxfloat:left}

.pic-list li img{ width:100pxheight:100pxdisplay:block}

</style>

<ul class="pic-list">

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/bizhi0708.jpg"></a></li>

<li><a href="#"><img src="http://img0.bdstatic.com/img/image/shouye/sheying0708.jpg"></a></li>

</ul>

</body>

</html>