内容的效果:“\0020”;属性? [英] What is the effect of content: "\0020"; property?

查看:633
本文介绍了内容的效果:“\0020”;属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.container:after {
content: "\0020";
display: block;
height: 0;
clear: both;
visibility: hidden;
overflow:hidden;}



内容

Contents

Please explain what is the effect of "content: "\0020"; property?

推荐答案

\0020 插入Unicode代码点U + 0020,这是一个空格,因此代码等同于 content:'';

\0020 inserts the Unicode code point U+0020, which is a space. So the code is equivalent to content: ' ';.

content:x 将值替换为 x

但是,在您发布的代码段中,此内容是不可见的,因此您不会看到任何内容。代码是 clearfix 实现重新浮动页面上的元素。

However, in the snippet you’ve posted, this content is made invisible anyway so you won’t actually see anything. The code is a clearfix implementation to re-float elements on the page.

这篇关于内容的效果:“\0020”;属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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