如何在html5中浮动section标签 [英] how to float the section tags in html5

查看:407
本文介绍了如何在html5中浮动section标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个简单的问题,所以,如何浮动 - 留下< section> 标签?我尝试使用 float:left; 但不工作,或者可以垂直对齐标签及其内容吗?

this might be a wee easy question, and so, how to float - left the <section> tag? i tried to use float: left; but does not work or is it possible to align vertically the tag along with content of it?

这是我的尝试。

html。

<div id="divcontent">
    <section>
        <h1>heyo</h1>
        <a href="dropitinmyass.html" ><p>asdasdasdasd</p></a>
    </section>
    <section>
        <h1>heyo</h1>
        <a href="dropitinmyass.html" ><p>asdasdasdasd</p></a>
    </section>
    <section>
        <h1>heyo</h1>
        <a href="dropitinmyass.html" ><p>asdasdasdasd</p></a>
    </section>
</div>

这里是css。

#divcontent {overflow: auto; padding: 15px;}
#divcontent section {float:left; width: 300px;}


推荐答案

和我解决它与我的脑力,好吧,我只是将父元素设置为float:left,当然片段标签,和woohla,像charm

Ok, i fix it, and i solve it with my brainy-brain, alright, i just set the parent element to float: left and of course the section tag to, and woohla, works like charm

这篇关于如何在html5中浮动section标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆