html怎么设置滚动图片?

html-css016

html怎么设置滚动图片?,第1张

方案一:直接使用HTML的滚动标签 marquee ,把图片放入滚滚标签内部,代码如下:

<marquee>

<img src='1.jpg'>

<img src='2.jpg'>

<img src='3.jpg'>

<img src='4.jpg'>

</marquee>

方案二:使用第三方插件,比如swiper.js,

插件

html中背景图片的重复滚动位置总写法,no-repeat:图片不重复 inherit:继承 具体效果请大家自测!另外,我们大家平时可能经常需要在表格的单元格内添加图片。除了和上面一样添加图片作为背景外,我们更常用的可能是把图片作为一个元素

<DIV id=demo style="overflow: hiddenwidth: 600pxheight: 190pxtop:485pxleft:252pxposition: absolute">

<table border="0" cellspacing="0" cellpadding="0">

<tr>

<td valign="top" id=demo1>

<!-- 循环滚动的图片 -->

<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" >

<tr>

<td width="200" align="center" style="height: 151px">

<a href="WebDeSign.aspx">

<img src="images/indexpic1.gif" width="194" height="147" border="0" /></a>

</td>

<td width="200" align="center" style="height: 151px">

<a href="SoftWare.aspx">

<img src="images/indexpic2.gif" width="194" height="147" border="0" /></a>

</td>