css - bootstrap 分页的一个问题
怪我咯
怪我咯 2017-04-17 13:03:54
0
3
431

先打开bootstrap中文
http://v3.bootcss.com/components/#pagination
看如下动画图,a标签有个样式:float:left; 把该属性去掉,则页码按钮就有了间隔,这是为什么?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
PHPzhong

Because the line break in the HTML code will also display a small space, there is no need to add float

if the following is written on one line
<li><a>1</a></li><li><a>2</a></li><li><a>3</a></li>
Ty80

The correct answer upstairs is because your line breaks are occupying space. Both inline and inline-block elements have this problem. After you use float: left, you have actually turned it into a block element. There are many solutions. You can read Zhang Xuxin’s old article http://www.zhangxinxu.com/wordpress/2012/04/inline-block-space-remove-%E5%8E%BB%E9%99%A4%E9%97% B4%E8%B7%9D/

大家讲道理

There are spaces or line breaks between tags causing spacing between inline elements

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!