gpt4 book ai didi

css - 清除hr元素:both in CKEditor edit window

转载 作者:行者123 更新时间:2023-11-28 09:39:23 25 4
gpt4 key购买 nike

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

CKEditor window screenshot

如何更新窗口中使用的 css,使 hr 标签具有 clear: both; 属性?

我试过添加标准

hr {
clear: both;
}

我自己的 less 属性,以及将它嵌套在 ckeditor 类中,但它没有任何效果。

最佳答案

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 .希望对您有所帮助。

关于css - 清除hr元素:both in CKEditor edit window,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25432937/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com