Rumah > hujung hadapan web > html tutorial > 为什么同样的源代码在localhost上显示的效果和源网站上效果不一样?_html/css_WEB-ITnose

为什么同样的源代码在localhost上显示的效果和源网站上效果不一样?_html/css_WEB-ITnose

WBOY
Lepaskan: 2016-06-21 09:02:48
asal
1103 orang telah melayarinya

这是源网站 http://v3.bootcss.com/examples/theme/
源网站的Carousel可以正常显示,而我发布到localhost中就不能显示了。。


回复讨论(解决方案)

相关的js css 等等文件你都引入全了没?或者实现方法里面写的对不对 

n你的html 代码里面的 属性是否和demo都一样?

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">        <ol class="carousel-indicators">          <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>          <li data-target="#carousel-example-generic" data-slide-to="1"></li>          <li data-target="#carousel-example-generic" data-slide-to="2"></li>        </ol>        <div class="carousel-inner" role="listbox">          <div class="item active">            <img data-src="holder.js/1140x500/auto/#777:#555/text:First slide" alt="First slide">          </div>          <div class="item">            <img data-src="holder.js/1140x500/auto/#666:#444/text:Second slide" alt="Second slide">          </div>          <div class="item">            <img data-src="holder.js/1140x500/auto/#555:#333/text:Third slide" alt="Third slide">          </div>        </div>        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">          <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>          <span class="sr-only">Previous</span>        </a>        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">          <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>          <span class="sr-only">Next</span>        </a>      </div>
Salin selepas log masuk
Salin selepas log masuk

n你的html 代码里面的 属性是否和demo都一样?

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">        <ol class="carousel-indicators">          <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>          <li data-target="#carousel-example-generic" data-slide-to="1"></li>          <li data-target="#carousel-example-generic" data-slide-to="2"></li>        </ol>        <div class="carousel-inner" role="listbox">          <div class="item active">            <img data-src="holder.js/1140x500/auto/#777:#555/text:First slide" alt="First slide">          </div>          <div class="item">            <img data-src="holder.js/1140x500/auto/#666:#444/text:Second slide" alt="Second slide">          </div>          <div class="item">            <img data-src="holder.js/1140x500/auto/#555:#333/text:Third slide" alt="Third slide">          </div>        </div>        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">          <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>          <span class="sr-only">Previous</span>        </a>        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">          <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>          <span class="sr-only">Next</span>        </a>      </div>
Salin selepas log masuk
Salin selepas log masuk


我就是把原网页的所有代码原封不动的复制了进去。。。
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan