一个支持任意尺寸的图片上下左右滑动效果

2022-01-14,,,,

如果你的网站风格适合,可以用这种方式来给页面布局,支持任意尺寸的图片滑动上下左右滑动,需要的朋友可以参考下

常常遇到图片通过后台上传后就变形了的问题,如果你的网站风格适合,可以用这种方式来给页面布局,支持任意尺寸的图片滑动(上下左右滑动)

   任意尺寸的图片滑动 div { margin: 0 auto; overflow: hidden;} .main { width: 1000px;} .divimg_div1 { width: 380px; float: left;} .divimg .div4_title { width: 380px; height: 103px; background-color: #EDB205; color: #FFF; font-family: "微软雅黑"; font-size: 22px; font-weight: bold; line-height: 90px; text-align: center; letter-spacing: 5px;} .divimg_img1 { width: 380px; height: 414px; margin-top: 5px; background-color: #FFF; position: relative;} .divimg_div2 { width: 615px; float: right;} .divimg_img2 { width: 194px; height: 256px; float: left; background-color: #FFF; position: relative;} .divimg_img3 { width: 417px; height: 256px; float: right; background-color: #FFF; position: relative;} .divimg_img4 { width: 366px; height: 262px; float: left; margin-top: 4px; background-color: #FFF; position: relative;} .divimg_img5 { width: 245px; height: 262px; float: right; margin-top: 4px; background-color: #FFF; position: relative;} .divimg .gif { position: absolute; left: 50%; top: 50%; margin-left: -50px; margin-top: -50px; z-index: 2;} .divimg .img { position: absolute; z-index: 1; left: 0; top: 0; display: none;}     任意尺寸的图片滑动      

以上就是一个支持任意尺寸的图片上下左右滑动效果的详细内容,更多请关注本站其它相关文章!

《一个支持任意尺寸的图片上下左右滑动效果.doc》

下载本文的Word格式文档,以方便收藏与打印。