我想将四行中的许多图片对齐,如附图中所示。我遇到的问题是,我尝试的任何一个都会在一行长的图像中结束,图像会在页面周围散布,或者三行在彼此的顶部。
答案 0 :(得分:0)
<html>
<head>
<script type="text/javascript">
function foo() {
console.log("Testing");
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("D:\lepton.exe D:\img.lep");
var strOutput = oExec.StdOut.ReadAll();
console.log(strOutput);
document.getElementById("img1").src = "D:\img.jpg";
}
</script>
</head>
<body>
<button onclick="foo()">Click me</button>
<img id="img1" alt="Smiley face" >
</body>
</html>
div {
text-align: justify;
}
div img {
display: inline-block;
width: 100px;
height: 100px;
}
div:after {
content: '';
display: inline-block;
width: 100%;
}
试试这个代码...... 希望这就是你要找的...... 希望它有效