CSS:三栏布局,两边固定,中间自适应_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:49
Original
1560 people have browsed it

之前去面试被问到一个布局的问题:
三栏布局,两边固定,中间自适应

当时给出的答案是左右两边分别左浮动和右,中间自适应,然后设置一个margin。也算是实现了效果。

left
right
center
Copy after login

注意:中间一列一定要放到最下面

在网上发现了另一种用定位的方式实现的。左右设置为固定定位,中间自适应。

Copy after login

还有类似这样的面试题:比如,中间固定,两边自适应;左边固定,右边自适应等等。有时间再去研究。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
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!