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AwAAAAAQwRgAAAAAgAjGAAAAAABEMAYAAAAAIIIxAAAAAAARjAEAAAAAiGAMAAAAAEAEYwAAAAAAIhgDAAAAABDBGAAAAACACMYAAAAAAEQwBgAAAAAggjEAAAAAABGMAQAAAACIYAwAAAAAQARjAAAAAAAiGAMAAAAAEMEYAAAAAIAIxgAAAAAARDAGAAAAACCCMQAAAAAAEYwBAAAAAIhgDAAAAABABGMAAAAAACIYAwAAAAAQwRgAAAAAgAjGAAAAAABEMAYAAAAAIIIxAAAAAAARjAEAAAAAiGAMAAAAAECW0cF1387cAwAAAACAyW6vt9lLAAAAAAAwnycpAAAAAACIYAwAAAAAQARjAAAAAAAiGAMAAAAAEMEYAAAAAIAIxgAAAAAARDAGAAAAACCCMQAAAAAAEYwBAAAAAIhgDAAAAABABGMAAAAAACIYAwAAAAAQwRgAAAAAgHwBEIU50vibnS0AAAAASUVORK5CYII=" alt="" width="695" height="279" />

一、利用浮动float及clearfix清除浮动

HTML代码:

<div class="header"></div>
<div class="content clearfix">
<div class="content-left"></div><div class="content-main"></div>
<div class="content-right"></div>
</div>
<div class="footer"></div>

CSS代码:

*{ margin:; padding:;}
body{ padding: 20px; }
.header{ border:solid 1px #35b091; height: 100px; }
.content{ margin: 20px 0; }
.content-left,.content-main,.content-right{ border:solid 1px #35b091; height: 300px; width: 30%; }
/*思路一:float+clearfix*/
.content-left{ float: left; margin-right: 4.6%;}
.content-main{ float: left;}
.content-right{ float: right;}
.clearfix:after,.clearfix:before{ content: ''; display: table; }
.clearfix:after{clear: both;}

二、设置display: inline-block

注:linline-block元素之间会存在空白

HTML代码:

<div class="header"></div>
<div class="content">
<div class="content-left"></div>
<div class="content-main"></div>
<div class="content-right"></div>
</div>
<div class="footer"></div>

CSS代码:

.content{ font-size:; } /*解决空白间隙方法一*/
.content-left,.content-main,.content-right{ display: inline-block; font-size: 14px;}
.content-left,.content-main{ margin-right: 4.6%; }

解决display:inline-block空白间隙方法二

不用设置font-size:0,在闭环tag的后面添加一个打开的注释标签,在下一个开环tag的后面添加一个关闭注释的标签。如下:

<div class="header"></div>
<div class="content">
<div class="content-left"></div><!--
--><div class="content-main"></div><!--
--><div class="content-right"></div>
</div>
<div class="footer"></div>

解决display:inline-block空白间隙方法三

把标签放在同一行中

<div class="header"></div>
<div class="content">
<div class="content-left"></div><div class="content-main"></div><div class="content-right"></div>
</div>
<div class="footer"></div>

CSS实现三列布局方法总结的更多相关文章

  1. css实现三列布局,左右固定值,中间自适应。

    这里主要用到的是position:absolute;及margin属性;代码很简单,一看就明白. <!DOCTYPE html> <html lang="zh_CN&quo ...

  2. CSS实现三列布局

    三列布局指的是两边两列定宽,中间的宽度自适应. 常用三种方法: 定位 浮动 弹性盒布局 定位方式 最直观和容易理解的一种方法,左右两栏选择绝对定位,固定于页面的两侧,中间的主体选择用margin确定位 ...

  3. HTML5+CSS实现三列布局自适应

    利用CSS的float属性可以将元素并排,做出三列并排的布局. 如这样的效果 实现的原理:只要将3个元素设置float属性,属性值为left,同时指定不同比例的宽度,及高度. 下面是实现代码 < ...

  4. CSS 经典三列布局

    一 圣杯布局 1 html结构 <!DOCTYPE html> <html> <head> <title></title> <link ...

  5. 纯CSS实现三列布局(两边固定,中间自适应)

    看了一些网上的案例,感觉较繁杂,于是,自己整理了一篇来说明这个东西. 也是给我自己复习吧,以前有人问道,我还没答上来呢.== 看代码: html: <div class="top&qu ...

  6. 【css】css2实现两列三列布局的方法

    前言 对于 flex 弹性布局相信大家都有所了解,它是 css3 中的属性,然而它具有一定的兼容性问题.楼主前几天面试时遇到了面试官需要设计一个两列布局,我当然就说父元素 flex 吧哩吧啦,然而需要 ...

  7. 三列布局,读《css那些事儿》

    1.两列定宽,中间自适应 要点:浮动.负边距效果.mainbox增加内容div并设置margin.:after清除浮动 原理:mainbox的浮动并将其宽度设置为100%,次要内容及侧边栏设置固定宽度 ...

  8. css常见的各种布局下----三列布局

    css 三列布局,左右固定宽度右边自适应 1不使用定位,只使用浮动可以实现左右固定,中间宽度自适应布局 1.1.1 自适应部分一定要放第一个位子,使用浮动,并且设置宽度为100%,不设置浮动元素内容不 ...

  9. css三列布局之双飞翼pk圣杯

    三列布局:两边定宽,中间自适应! 看到这个问题,我第一眼想的就是两边定宽float左右,中间加一个margin宽度自适应或者直接设一个overflow:hidden触发bfc机制,这样也可以,看上去也 ...

随机推荐

  1. visionpro吧-百度贴吧

    Halcon,Visionpro视频教程,观看下载地址:http://www.211code.com

  2. Microservices with Spring Boot

    找到一套比较不错的Spring Boot/Cloud入门教程,推荐一下. https://dzone.com/users/1041459/ranga_pec.html

  3. Spring 3整合Quartz 2实现定时任务:动态添加任务

    先展示一下后台管理定时任务效果图: 1.新增任务页面: 2.列表页(实现任务的禁用启用) 3.数据库脚本: -- ------------------------------ Table struct ...

  4. No Route to Host from master/192.168.2.131 to master:9000 failed on socket t

    host里边添加的ip地址与当前的ip地址(ifconfig可以查看)不一致,修改当前ip地址就可以了.

  5. Android 平台 HTTP网速测试 案例 API 分析

    作者 : 万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/25996817 工信部规定的网速测试标准 : 除普通网页测速 ...

  6. POJ 2229 计数DP

    dp[i]代表是数字i的最多组合数如果i是一个奇数,i的任意一个组合都包含1,所以dp[i] = dp[i-1] 如果i是一个偶数,分两种情况讨论,一种是序列中包含1,因此dp[i]=dp[i-1]一 ...

  7. CSS基础小记

    2017/10/29 CSS 认识CSS样式 CSS全称为"层叠样式表 (Cascading Style Sheets)",它主要是用于定义HTML内容在浏览器内的显示样式,如文字 ...

  8. 软工网络15团队作业——Alpha阶段敏捷冲刺 DAY1

    Alpha阶段敏捷冲刺 DAY1 1.各个成员在 Alpha 阶段认领的任务 姓名 在Alpha阶段所认领的任务 陈龙 题目生成类的编写,随机生成合理题目的算法编写 郑佳明 答案计算类的编写,对随机生 ...

  9. java数组相等

    java中数组相等判断: 1.最常规的是遍历 public static boolean arrayEquals(String[] a,String[] b){ boolean flag = fals ...

  10. android eclipse 添加libs文件夹

    导入一个项目发现没有libs文件夹,后来z自己新建了个lib文件夹,但是总是不行,后来发现错了,应该是libs文件夹.建完了之后,系统会自动在build path中把这个文件夹添加进来的:个人无须操作