大佬教程收集整理的这篇文章主要介绍了css – 使用bootstrap 3进行文章推/拉对齐,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在移动设备上我想订购文章的内容,如:
>标题
>图片
>内容
在桌面上,我想要左边的图像和右边的标题和内容.
Alignment i want http://f.cl.ly/items/300e2K3V3H3c3f3F3p0q/Napkin%2027.09.13%209.47.05%20AM.png
这是我的代码
<article class="row"> <header class="col-md-8 col-md-push-4"> <a href="#"> <h2>title</h2> </a> </header> <div class="col-md-4 col-md-pull-8"> <figure> <a class="thumbnail" href="#"> <img src="..." alt="4x3 Image" class="img-responsive"> <figcaption>Caption</figcaption> </a> </figure> </div> <div class="col-md-8 col-md-push-4"> <p>Content</p> </div> </article>
但是使用此代码,内容位于右侧,但位于图像下方.
http://f.cl.ly/items/1T3f093W2I0m3Q1E360g/Napkin%2027.09.13%2010.56.59%20AM.png
有没有一种简单的方法来获得我想要的东西?
CSS:
.floatright{float:right;} @media (max-width: 768pX) { .floatright{float:none;} }
HTML:
<div class="container" style="BACkground-color:green"> <article class="row"> <header class="col-md-8 floatright"> <a href="#"> <h2>title</h2> </a> </header> <div class="col-md-4"> <figure> <a class="thumbnail" href="#"> <img src="..." alt="4x3 Image" class="img-responsive"> <figcaption>Caption</figcaption> </a> </figure> </div> <div class="col-md-8 floatright"> <p>Content</p> </div> </article> </div>
以上是大佬教程为你收集整理的css – 使用bootstrap 3进行文章推/拉对齐全部内容,希望文章能够帮你解决css – 使用bootstrap 3进行文章推/拉对齐所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。