我在一个CKEditor 4窗口中添加内容,并且我有一个hr元素,它没有清除左边的内容:

如何更新窗口中使用的css,使hr标记具有clear: both;属性?
我已经尝试添加了标准
hr {
clear: both;
}属性,以及将其嵌套在ckeditor类中,但都没有效果。
发布于 2014-08-22 16:42:16
hr标签是为了创建一个“段落级别的主题中断”,它不是用来清除的。此外,还可以使用以下CSS在hr标记后添加div元素:
<style type="text/css">
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-block;} /* for IE/Mac */
</style><!-- main stylesheet ends, CC with new stylesheet below... -->
<!--[if IE]>
<style type="text/css">
.clearfix {
zoom: 1; /* triggers hasLayout */
display: block; /* resets display for IE/Win */
} /* Only IE can see inside the conditional comment
and read this CSS rule. Don't ever use a normal HTML
comment inside the CC or it will close prematurely. */
</style>
<![endif]-->你可以阅读更多关于它的here。希望这能有所帮助。
https://stackoverflow.com/questions/25432937
复制相似问题