clearfix

重温清除浮动方法,逐句解释clearfix的意义 清除浮动,clearfix,单伪元素清除浮动,双伪元素清除浮动 阅读详情
一,什么是.clearfix

你只要到Google或者Baidu随便一搜"css清除浮动",就会发现很多网站都讲到"盒子清除内部浮动时可以用到.clearfix"。

.clearfix:after {
  content: " ";
  display: block;
  clear: both;
  height: 0;
}
.clearfix {
  zoom: 1;
}

<div class="clearfix">
  <div class="floated"></div>
</div>

上面的代码就是.clearfix的定义和应用,简单的说下.clearfix的原理:

1、在IE6, 7下zoom: 1会触发hasLayout,从而使元素闭合内部的浮动。

2、在标准浏览器下,.clearfix:after这个伪类会在应用到.clearfix的元素后面插入一个clear: both的块级元素,从而达到清除浮动的作用。

<div>
  <div class="floated"></div>
</div>
<div style="clear: both"></div>

二,.clearfix的弊端

在上面的代码中可以看到,抛开IE6, 7不谈,.clearfix在标准浏览器下插入了一个clear: both的元素,这样很可能清除掉不必要的浮动。举例来说明:

<!DOCTYPE html>
<html>
<head>
  <title>Demo</title>
  <style type="text/css">
    html, body { padding: 0; margin: 0; }
    ul { margin: 0; padding: 0; } 
  
    .clearfix:after {
      content: " ";
      display: block;
      clear: both;
      height: 0;
    }
    .clearfix {
      zoom: 1;
    }
  
    .left-col {
      background: red;
      float: left;
      width: 100px;
      height: 300px;
    }
    .right-col {
      margin-left: 100px;
    }
    .menu {
      border: 1px solid #000;
    }
    .menu li {
      float: left;
      display: block;
      padding: 0 1em;
      margin: 0 1em 0 0;
      background: #ccc;
    }
    .placeholder {
      background: yellow;
      height: 400px;
    }
  </style>
</head>
<body>
  <div class="left-col">
  </div>
  <div class="right-col">
    <ul class="menu">
      <li>Menu Item</li>
      <li>Menu Item</li>
      <li>Menu Item</li>
      <li>Menu Item</li>
      <li>Menu Item</li>
      <li>Menu Item</li>
    </ul>
    <div class="placeholder"></div>
  </div>
</body>
</html>

上面的代码构成一个两列布局的页面。注意.menu这个菜单设置了边框,但是由于.menu的li元素是左浮动的,导致.menu没有高度,于是可以用.clearfix来清除.menu内部的浮动。代码如下:

<ul class="menu clearfix">
  <li>Menu Item</li>
  <li>Menu Item</li>
  <li>Menu Item</li>
  <li>Menu Item</li>
  <li>Menu Item</li>
  <li>Menu Item</li>
</ul>

但是应用完.clearfix后,在标准浏览器下页面变得很乱,这是因为.clearfix:after把.left-col的浮动也给清除掉了。

三,重构.clearfix

在遭遇到上面的错误之后,分析一下除了.clearfix:after这种方式之外还有没有别的方法清除元素内部的浮动。答案是有的,在白话Block Formatting Contexts这篇文章中提到过构成Block Formatting Context的元素可以清除内部元素的浮动。那么只要使.clearfix形成Block Formatting Context就好了。构成Block Formatting Context的方法有下面几种:

  • float的值不为none。
  • overflow的值不为visible。
  • display的值为table-cell, table-caption, inline-block中的任何一个。
  • position的值不为relative和static。

很明显,float和position不合适我们的需求。那只能从overflow或者display中选取一个。因为是应用了.clearfix和.menu的菜单极有可能是多级的,所以overflow: hidden或overflow: auto也不满足需求(会把下拉的菜单隐藏掉或者出滚动条),那么只能从display下手。

我们可以将.clearfix的display值设为table-cell, table-caption, inline-block中的任何一个,但是display: inline-block会产生多余空白,所以也排除掉。剩下的只有table-cell, table-caption,为了保证兼容可以用display: table来使.clearfix形成一个Block Formatting Context,因为display: table会产生一些匿名盒子,这些匿名盒子的其中一个(display值为table-cell)会形成Block Formatting Context。这样我们新的.clearfix就会闭合内部元素的浮动。下面是重构之后的.clearfix。

.clearfix {
  zoom: 1;
  display: table;
  width: 100%;
}

四,总结

在IE6, 7下面只要是触发了hasLayout的元素就可以清除内部浮动了。而在标准浏览器下面清除元素内部浮动的方法有很多,除了.clearfix:after这种方式,其余的方法无非就是产生新的Block Formatting Context以达到目的。如果可以做到在什么条件下用哪种方法,我认为这样就足够了......



.clearfix {
  *zoom: 1;
  &:before,
  &:after {
    display: table;
    content: "";
    // Fixes Opera/contenteditable bug:
    // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
    line-height: 0;
  }
  &:after {
    clear: both;
  }
}
CSS中的清除浮动(clearfix)是什么?如何使用它? 然后,通过display: table将伪元素转换为块级元素,并使用clear: both清除浮动,使父元素能够正确包含浮动元素,从而避免高度塌陷问题。在CSS中,清除浮动(clearfix)是一种解决元素浮动造成的父元素高度塌陷的技术。当一个元素浮动后,其父元素可能会因为没有包含浮动元素而无法正确计算高度,导致父元素的高度塌陷,影响布局。清除浮动的常见方法是使用clearfix技术,通过在父元素上应用特定的样式规则来修复高度塌陷问题。上,以确保该父元素正确包含内部的浮动元素。 阅读详情

相关推荐

Matlab使用GitHub的踩坑记录(持续更新)

Matlab使用git的踩坑记录前言Matlab设置Git的官方帮助文档系统配置新建Git两种代码管理方式典型源代码管理SVN分布式源代码管理 Git注意:SVN和Git都可以用GitHub创建新的库 前言 作为Git初学者,对Git的代码版本管理非常非常喜欢,给了我极大的安全感。特别是想到之前的几次Matlab、Latex和python的代码莫名其妙被折腾没了又没法找回的悲剧,决定慢慢的走入gi...

voluntry的博客 7296

clearfix详解

clear clear属性可以用于清除元素周围的浮动对元素的影响。 也就是元素不会因为上方出现了浮动元素而改变位置。 • 可选值: – left:忽略元素左侧浮动影响 – right:忽略元素右侧浮动影响 – both:忽略元素两边浮动影响 – none:不忽略浮动,默认值 清楚浮动方案 1、可以在父元素的底部,添加一个空白的块级元素,并且给该元素设置clear:both;(兼容各种浏览器,w3c...

weixin_43269800的博客 2307

Docker一键部署Synopsys EDA全家桶(VCS/Verdi 2018版)保姆级教程

本文提供了一份详尽的Docker容器化部署Synopsys EDA工具链(VCS/Verdi 2018版)的保姆级教程。通过环境隔离与标准化,解决传统安装的依赖冲突问题,并重点攻克了容器内GUI图形界面显示的核心难题。教程涵盖从Docker基础安装、镜像获取、容器启动配置,到使用X11转发或VNC实现Verdi完美显示的完整实践,旨在帮助芯片设计工程师快速构建稳定、可移植的一键化EDA工作环境。

weixin_29281941的博客 198

【css】给元素添加class属性clearfix以清除浮动

.clearfix::after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }

qq_45981245的博客 523

Transformers 中的 Softmax 可以并行加速么?

通过融合前两个计算步骤,降低执行Reduce_max和Reduce_sum等操作的通信开销。利用共享内存来存储临时数据,以减少对全局内存的访问成本。

stephen147的博客 1234

告别图像畸变:手把手教你用HALCON的`gen_image_to_world_plane_map`做高精度视觉测量

本文详细解析了HALCON的`gen_image_to_world_plane_map`算子在工业视觉测量中的应用,通过精确的几何变换消除透视畸变,提升测量精度。文章涵盖相机标定、世界坐标系建立、实战应用及性能优化,适用于液晶屏质检、金属板检测等场景,帮助工程师实现高精度视觉测量。

weixin_28718487的博客 423

css中关于clearfix清除浮动方法详解

在写HTML代码的时候,发现在Firefox等符合W3C标准的浏览器中,如果有一个DIV作为外部容器,内部的DIV如果设置了float样式,则外部的容器DIV因为内部没有clear,导致不能被撑开 在写HTML代码的时候,发现在Firefox等符合W3C标准的浏览器中,如果有一个DIV作为外部容器,内部的DIV如果设置了float样式,则外部的容器DIV因为内部没有clear,导致不能被

云曦沥雨 1818

2026年VIVO嵌入式岗位高频面试题(含参考答案)

摘要:VIVO嵌入式岗位考核涵盖智能手机、IoT设备、芯片适配等方向,重点考察硬件底层交互、RTOS/Linux开发、C/C++功底与问题排查能力。题目按优先级排序,分硬件架构、RTOS、C/C++、数据结构、Linux实践、行业认知6大模块,共40道题。硬件部分涉及中断、ARM架构、加速技术、BSP开发等;RTOS部分区分硬/软实时系统;C/C++部分侧重内存管理、位操作;Linux部分考察常用命令;行业部分关注鸿蒙等系统理念。题目设计贴合实际工作场景,全面评估嵌入式开发能力。

Open 52

什么是 clearfix ?

什么是 clearfix ?clearfix 是一种 CSS 技巧,可以在不添加新的 html 标签的前提下,解决让父元素包含浮动的子元素的问题。这个技巧的版本是很多的,最流行的一个是 Micro Clearfix Hack 。这个也是 Bootstrap 采用的方案(可以 google 一下 “bootstrap clearfix” 来查看详情)。 Micro Clearfix Hack 的作者给

夏婉轩的博客 2万+

在 SAP 中,应收票据的收取、到期承兑、贴现均有标准操作路径与事务码,以下按业务场景给出操作步骤、T-code、会计分录(含附 / 不附追索权)

摘要:本文详细介绍了SAP系统中应收票据的全流程处理,包括收款(F-36)、到期承兑(F-34/F-20)和贴现(F-33)的标准操作。重点说明了不同业务场景下的事务码使用、操作步骤及对应的会计分录,特别区分了附追索权与不附追索权贴现的处理差异。同时提供了票据查询(FBL5N)和清账(F-32)的辅助功能指引,并汇总了各业务场景的核心会计分录,为财务人员提供了一套完整的SAP应收票据操作指南。(149字)

金牌架构师 263

基于SiamFC的红外目标跟踪

初始化阶段:在第一帧中,通过用户标注获得目标框,从目标区域中提取一个固定大小的模板(称为 exemplar)。搜索阶段:在后续帧中,在以当前目标中心为中心的较大区域(称为 instance)内进行搜索,将模板与搜索区域通过卷积操作得到响应图。位置更新:在响应图中找到峰值位置,并转换到原图坐标,用以更新目标中心。部分实现中还会考虑多尺度搜索和目标尺寸更新。import cv2# 定义 SiamFC 简易网络(示例)# 特征提取部分,注意红外图像通常为单通道,使用较少的卷积核数提高实时性。

weixin_43745234的博客 774

什么是clearfix?

Recently I was looking through some website's code, and saw that every <div> had a class clea

p15097962069的博客 788

05 SAP CPI 访问第一个CPI接口

其中的clientid的值可作为Basic验证的用户名,clientsecret的值可作为Basic验证的密码。点击SEND按钮,可看见返回状态为200 OK。在04中,我们得到TOKEN令牌。POSTMAN向下滚动。点击按钮获取token。

SAP CPI 662

在less中调用clearfix这个类

在用clearfix清除浮动时 .clearfix{ &:before, &:after{ content: " "; display: table; } &:after{ clear:both; } } 不能带括号,即不能用clearfix() 否则会无法继承,只能继承一个类,而继承调用混合,但bootstrap源码中有括号 .clearfix{ clearfix(); } 因为源码中用了上述调用,因此可以被继承。 ...

qq_45868495的博客 890

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

关于清除浮动clearfix的理解

首先,为什么要使用clearfix(清除浮动)? 以下学习整理来源:https://www.jianshu.com/p/9d6a6fc3e398 通常我们在写html+css的时候,如果一个父级元素内部的子元素是浮动的(float),那么常会发生父元素不能被子元素正常撑开的情况,如下图所示: HTML代码 CSS代码 效果 <body> ...

736

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

css中clearfix清除浮动的用法

clearfix的定义:   .clearfix:after {}{ content: "."; /**//*内容为“.”就是一个英文的句号而已。也可以不写。*/ display: block; /**//*加入的这个元素转换为块级元素。*/ clear: both; /**//*清除左右两边浮动。*/ visibility:

学习也休闲 5718

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

clearfix的用法

如果有一个DIV作为外部容器,内部的DIV如果设置了float样式,则外部的容器DIV因为内部没有 clear,导致不能被撑开。看下面的例子: Div布局如下: Css代码如下: .out{border:1px solid #F00; width:500px;} .inner1{width:200px; height:200px; float:left; border:1px so

rudy24的博客 1770

简述clear和clearfix

clearfix 主要是用在浮动层的父层,放在前面; clear 主要是用在浮动层与浮动层之间,和浮动层同一级,如果想要撑开父层的高度,clear 就要放在最后。 举个例子(部分代码) <body> <h2>用 clear 清除浮动</h2> <div class="demo"> <div class="fl item1"></div> <

bingxi312的博客 920

Clearfix

Clearfix Quickly and easily clear floated content within a container by adding a clearfix utility. ads via Carbon Limited time offer: Get 10 free Adobe Stock images. ads via Carbon Easily clear floats...

[Blog][Domain] programb.blog.youkuaiyun.com 588

clearfix清除浮动

要使用clearfix清除浮动,首先了解为什么使用要清除浮动 浮动的缺点 浏览器的浮动通常使用float实现,但使用了float的子元素无法正常撑开父级元素,如下图所示: 父级元素没被撑开会有什么影响,使用一个常见的footer例子来说明 我们可以看到footer的布局方式并不是我们想要让它做的,原因是footer原本的位置被左边的浮动内容给占据,为了让footer置于底部,便需要清除foot...

weixin_43800124的博客 353

关于clearfix清除浮动

起源: .clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } .clearfix { display: inline-table; } /* Hides from IE-mac \*/ * html...

aijue2015的博客 127

51clearfix

外边距重叠问题 <!DOCTYPE html> <html lang="ch"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <titl

quanxiaobai_的博客 174

清除浮动的应用clearfix

清除浮动 <div class="header clearfix"> div1 <div class="item1">div11</div> <div class="item2">div12</div> <div class="item3">div13</div&g...

de0414的专栏 307

《前端》清除浮动bug使用 .clearfix{*zoom:1;} 和 .clearfix:after

.clearfix{*zoom:1;} /*这是针对于IE6/7的,因为IE6/7不支持:after伪类,这个神奇的zoom:1让IE6/7的元素可以清除浮动来包裹内部元素。具体意思的话,不用深究,听说微软的工程师自己都无法解释清楚。height:1%效果也是一样*/ .clearfix:after{display:block; overflow:hidden; clear:both; heig...

BelleDiao的博客 3431

clearfix_clearfix hack的结尾?

clearfixA new value of the display property has landed in Chrome Canary and Firefox Nightlies. In the Editor’s Draft of the CSS Display Module Level 3, display: flow-root is defined as: 显示属性的新值已经出现在C...

cundai5745的博客 214
上一篇: 关于CSS中的float和position
下一篇: javascript:en(de)codeURI、en(de)codeURIComponent、(un)escape、btoa(atob)
瞬息之间
博客等级 码龄9年 0粉丝 4原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值