【发布时间】:2017-04-29 12:00:18
【问题描述】:
我想将 textarea 中的文本发布到另一个 html 页面。
但是当我将文本粘贴到textarea 时,字体和大小不符合我的风格!
我已经设置了 textarea 和 <p> 字体大小和字体系列,但它没有帮助。
<textarea class="cleditor" id="textarea2"name="about" rows="3"></textarea>
.cleditorMain {border:1px solid #ddd; padding:0 1px 1px; background-color:white}
.cleditorMain iframe {border:none; margin:0; padding:0}
.cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; dir:rtl; font-family:Verdana,sans-serif;font-weight:normal;resize:none;outline:none /* webkit grip focus */}
.cleditorToolbar {background: url('../img/toolbar.gif') repeat}
.cleditorGroup {float:left; height:26px}
.cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0;background: url('../img/buttons.gif')}
.cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
.cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
.cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
.cleditorList div {padding:2px 4px 2px 4px}
.cleditorList p,
.cleditorList h1,
.cleditorList h2,
.cleditorList h3,
.cleditorList h4,
.cleditorList h5,
.cleditorList h6,
.cleditorList font {padding:0; margin:0; background-color:Transparent}
.cleditorColor {width:150px; padding:1px 0 0 1px}
.cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
.cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
.cleditorPrompt input,
.cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
.cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}
html代码
<p class="about-p">
{!! $about['about'] !!}
</p>
css
.about-p{
font-family: Verdana,sans-serif;
font-weight:normal;
text-align:justify;
}
【问题讨论】:
-
请添加你的html,css代码,否则我们只能预测
-
请阅读How do I ask a good question并相应地编辑您的问题,因为这将大大提高您获得好的答案的机会,并且不会让您的问题被否决或关闭。
-
如果您想为所有
tags明确设置特定的font,那么您可以执行* { font-family: cursive !important;}之类的操作。
标签: php jquery html css cleditor