<script type="text/javascript">
for (var i = 0; i < serverPreviewImg.length; i++) {
var imgBox = document.getElementById("imgBox");
imgBox.innerHTML += "<img id='img" + i + "' />";
var imgObjPreview = document.getElementById("img"+i);
imgObjPreview.src = serverPreviewImg[i];
};
</script>
<body>
<div class="serverPreviewCont">
<div class="serverPreviewTitle">循环展示图片</div>
<div id="imgBox">
</div>
</div>
</body>
<style rel="stylesheet">
html{
width: 100%;
height: 100%;
}
body {
height: 100%;
font: normal normal 14px "PingFangSC-Regular,PingFang SC";
}
* {
padding: 0;
margin: 0;
}
.serverPreviewCont{
width: 100%;
height: 100%;
}
.serverPreviewTitle{
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
font-weight: bold;
}
#imgBox{
height: calc(100% - 40px);
overflow: auto;
}
img{
width: 100%;
display: block;
}
</style>
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。