有人可以建议并提供示例代码来安排下面的图片吗?它用于带有链接图像的 html 签名,但我不确定是表格还是 CSS 最好。
最左边的图像应该与其他 4 个水平对齐,并且顶部的两个图像需要在下面的较大图像上方居中。
感谢任何帮助。
最佳答案
使用 css 比使用 table 更好。我想你想要这样的东西。但您应该按宽度和高度属性缩放图像:
<!DOCTYPE html>
<head>
<title>goodarzi</title>
</head>
<style>
.first{
float:left;
width:30%;
text-align:center;
}
</style>
<body>
<div class="wrapper">
<div class="first">
<a href="" ><img src="" title="" /></a>
</div>
<div class="first">
<div>
<a href=""><img src="" title="" /></a>
</div>
<div><a href=""><img src="" title="" /></a>
</div>
</div>
<div class="first">
<div>
<a href=""><img src="" title="" /></a>
</div>
<div><a href=""><img src="" title="" /></a>
</div>
</div>
</div>
</body>
</html>
关于html - 用于对齐签名中图像的表格或 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36246176/