效果图
HTML
<div class="bj"> <center><h1>表白电子相册</h1></center> <marquee scrollamout="1"> <div> <img src="images/1.png" height="300" width="300" > <img src="images/2.png" height="300" width="300"> <img src="images/3.jpg" height="300" width="300"> <img src="images/4.jpg" height="300" width="300"> <img src="images/5.jpg" height="300" width="300"> <img src="images/6.jpg" height="300" width="300"> <img src="images/7.jpg" height="300" width="300"> <img src="images/8.png" height="300" width="300"> </div> </marquee> </div>
CSS
body{ height:1920px; padding:0px; margin:0px; } .bj{ height:1000px; width:1500px; background-size:100% 100%; background-image:url(images/bj.jpg); } .kg{ height:300px; width:50px; } img{ margin:50px 50px auto; }
原文:https://www.cnblogs.com/JunJun-is-studying/p/13862310.html