html中怎么排列图片

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>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/6291754.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-20
下一篇 2023-03-20

发表评论

登录后才能评论

评论列表(0条)

保存