大佬教程收集整理的这篇文章主要介绍了css3 – Bootstrap旋转木马作为网站背景,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
body { BACkground: url('Content/images/planet.gif') no-repeat center center fixed; -webkit-BACkground-size: cover; -moz-BACkground-size: cover; -o-BACkground-size: cover; BACkground-size: cover; }
它看起来不错,当我试图改变浏览器窗口大小时,调整大小完美.
现在我想通过添加背景轮播为我的网站添加一些视觉效果.有没有办法在整个背景下实现标准的bootstrap轮播?
我发现了一个可能的解决方案HERE,但让我感到困惑的是 – img标签用于不同的图像.我试图通过背景网址做同样的事情,但无法弄明白.
HTML:
<div id="myCarousel" class="carousel container slide"> <div class="carousel-inner"> <div class="active item one"></div> <div class="item two"></div> <div class="item three"></div> </div> </div>
CSS:
.carousel { z-index: -99; } /* keeps this behind all content */ .carousel .item { position: fixed; width: 100%; height: 100%; -webkit-transition: opacity 1s; -moz-transition: opacity 1s; -ms-transition: opacity 1s; -o-transition: opacity 1s; transition: opacity 1s; } .carousel .one { BACkground: url(assets/img/slide3blur.jpg); BACkground-size: cover; -moz-BACkground-size: cover; } .carousel .two { BACkground: url(assets/img/slide2blur.jpg); BACkground-size: cover; -moz-BACkground-size: cover; } .carousel .three { BACkground: url(assets/img/slide1blur.jpg); BACkground-size: cover; -moz-BACkground-size: cover; } .carousel .active.left { left:0; opacity:0; z-index:2; }
JS:
<script type="text/javascript"> $(document).ready(function() { $('.carousel').carousel({interval: 7000}); }); </script>
以上是大佬教程为你收集整理的css3 – Bootstrap旋转木马作为网站背景全部内容,希望文章能够帮你解决css3 – Bootstrap旋转木马作为网站背景所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。