html文本樣式
㈠ html文本框樣式
沒有特定的函數解決這個問題。你要自己替換。比如/r/n替換為
㈡ html常用的字體樣式
font-family:'Microsoft YaHei'。
1、網頁字體樣式華文黑體:STHeiti
2、網頁字體樣式華文楷體:STKaiti
3、網頁字體樣式華文宋體:STSong
4、網頁字體樣式華文仿宋:STFangsong
5、網頁字體樣式黑體:SimHei
6、網頁字體樣式宋體:SimSun
7、網頁字體樣式新宋體:NSimSun
8、網頁字體樣式仿宋:FangSong
9、網頁字體樣式楷體:KaiTi
10、網頁字體樣式仿宋_GB2312:FangSong_GB2312
11、網頁字體樣式楷體_GB2312:KaiTi_GB2312
12、網頁字體樣式微軟正黑體:Microsoft JhengHei
13、網頁字體樣式微軟雅黑體:Microsoft YaHei
14、網頁字體樣式隸書:LiSu
15、網頁字體樣式幼圓:YouYuan
16、網頁字體樣式華文細黑:STXihei
17、網頁字體樣式華文楷體:STKaiti
18、網頁字體樣式華文宋體:STSong
19、網頁字體樣式華文中宋:STZhongsong
20、網頁字體樣式華文仿宋:STFangsong
21、網頁字體樣式方正舒體:FZShuTi
22、網頁字體樣式方正姚體:FZYaoti
23、網頁字體樣式華文彩雲:STCaiyun
24、網頁字體樣式華文琥珀:STHupo
25、網頁字體樣式華文隸書:STLiti
26、網頁字體樣式華文行楷:STXingkai
27、網頁字體樣式華文新魏:STXinwei
(2)html文本樣式擴展閱讀
html內容描述
<h1></h1> 最大的標題(一號標題)
<pre></pre> 預先格式化文本 (英文全稱:PREformatted)
<u></u> 下劃線(英文全稱:Underline)
<b></b> 黑體字 (英文全稱:Bold)
<i></i> 斜體字 (英文全稱:Italics)
<tt></tt>打字機風格的字體
<cite></cite>引用,通常是斜體
<em></em> 強調文本(通常是斜體加黑體、英文全稱:EMphasize)
<strong></strong> 加重文本(通常是斜體加黑體)
<font size="" color=""></font> 設置字體大小從1到7,顏色使用名字或RGB(中文全稱:紅綠藍)的十六進制值
<BASEFONT></BASEFONT>基準字體標記
<big></big> 字體加大
<SMALL></SMALL> 字體縮小
<DELECT></DELECT> 加刪除線
<CODE></CODE>程式碼
<KBD></KBD>鍵盤字(英文全稱:KeyBoarD)
<SAMP></SAMP> 範例(英文全稱:SAMPle)
<VAR></VAR> 變數(英文全稱:VARiable)
<BLOCKQUOTE></BLOCKQUOTE> 向右縮排(向右縮進、塊引用)
<DFN></DFN> 述語定義(英文全稱:DeFiNe)
<ADDRESS></ADDRESS>地址標記
<sup></SUP> 上標字 (英文全稱:SUPerscript)
<SUB></SUB> 下標字(英文全稱:SUBscript)
<xmp>...</xmp>;固定寬度字體(在文件中空白、換行、定位功能有效)
<plaintext>...</plaintext>;固定寬度字體(不執行標記符號)
<listing>...</listing> 固定寬度小字體
<font color=00ff00>...</font>;字體 顏色
<font size=1>...</font>;字體 大小等於1(最小)。
<font style ='font-size:100 px'>...</font>;字體 樣式等於無限增大(100像素)
㈢ HTML中如何用CSS設置文本樣式
在head標簽里添加style標簽。css標簽都寫在style標簽中,就可以了
㈣ 文本域的HTML文本域幾種樣式
1.沒有滾動條的文本域(無邊框)
<textarea style=border: 0; overflow: auto; color: #FFFFFF; background-image: url(http://expert.csdn.net/images/csdn.gif)></textarea>
2.紅色邊框的文本域
<textarea style=border: #FF0000 1px solid; overflow: visible; color: #FFFFFF; background-image: url(http://expert.csdn.net/images/csdn.gif)></textarea>
3.無邊框有滾動條
<textarea style=scrollbar-face-color:#ff80ff;border:0px;background-image:url(http://expert.csdn.net/images/ad/dby3_database_120.GIF);color:#ffffff;font-size:15pt;font-weight:bold>
雨中人<br>雨中人<br>雨中人<br>雨中人<br>雨中人<br>雨中人 <br>雨中人<br>雨中人<br>雨中人<br>雨中人<br>雨中人< br>雨中人<br>雨中人<br>雨中人<br>雨中人<br>雨中人<br>雨中人<br>雨中人<br>
</textarea>
4.比較好看的一個
<input name=email type=text id=email style=height:19;border-top: 1px solid #808080;border-right: 1px solid #D4D0C8;border-bottom: 1px solid #D4D0C8;border-left: 1px solid #808080; value= size=29>
<br>
<textarea name=content cols=36 rows=8 id=content style=border: 1 solid #888888;LINE-HEIGHT:18px;padding: 3px;></textarea>
<textarea style=border: #FF0000 1px solid; overflow: visible; color: #FFFFFF; background-image: url(http://expert.csdn.net/images/csdn.gif)></textarea>
其它:
<textarea style=border: 0; overflow: auto; color: #FFFFFF; background-image: url(http://expert.csdn.net/images/csdn.gif)></textarea>
1、設置文本域的字體
<TEXTAREA STYLE=font-size:9pt;font-family:verdana;color:#333333>輸入內容</textarea>
2、設置文本域的背景色
<TEXTAREA STYLE=background-color:#ffffff>輸入內容</textarea>
3、文本域的虛線邊框設置
<TEXTAREA STYLE=border:1px dotted #6CABE7;>輸入內容</textarea>
4、文本域的實線邊框設置
<TEXTAREA STYLE=border:1px solid #6CABE7;>輸入內容</textarea>
5、文本域的點線邊框設置
<TEXTAREA STYLE=border:2px dotted #6CABE7;>輸入內容</textarea>
6、 設置文本域的背景圖
<TEXTAREA STYLE=background-attachment: fixed; background-image: url(背景圖所處位置)></textarea>
㈤ html 文字超鏈接樣式
a:link {color: #fff} /* 未被訪問的鏈接白色 */
a:visited {color: #f00} /* 已被訪問過內的鏈接 紅色 */
a:hover {color: #00f} /* 滑鼠懸浮在上的容鏈接 藍色 */
㈥ html5的文本框樣式有哪些
輸入框景背景透明:
<input style="background:transparent;border:1px solid #ffffff">
滑鼠劃過輸入框,輸入框背景色變色:
<INPUT value="Type here" NAME="user_pass" TYPE="text" SIZE="29" onmouseover="this.style.borderColor='black';this.style.backgroundColor='plum'"
style="width: 106; height: 21"
onmouseout="this.style.borderColor='black';this.style.backgroundColor='#ffffff'" style="border-width:1px;border-color=black">
輸入字時輸入框邊框閃爍(邊框為小方型):
<Script Language="JavaScript">
function borderColor(){
if(self['oText'].style.borderColor=='red'){
self['oText'].style.borderColor = 'yellow';
}else{
self['oText'].style.borderColor = 'red';
}
oTime = setTimeout('borderColor()',400);
}
</Script>
<input type="text" id="oText" style="border:5px dotted red;color:red" onfocus="borderColor(this);" onblur="clearTimeout(oTime);">
輸入字時輸入框邊框閃爍(邊框為虛線):
<style>
#oText{border:1px dotted #ff0000;ryo:expression_r(onfocus=function light (){with(document.all.oText){style.borderColor=(style.borderColor=="#ffee00"?"#ff0000":"#ffee00");timer=setTimeout(light,500);}},onblur=function(){this.style.borderColor="#ff0000";clearTimeout(timer)})};
</style>
<input type="text" id="oText">
自動橫向廷伸的輸入框:
<input type="text" style="huerreson:expression_r(this.width=this.scrollWidth)" value="abcdefghijk">
自動向下廷伸的文本框:
<textarea name="content" rows="6" cols="80" onpropertychange="if(this.scrollHeight>80) this.style.posHeight=this.scrollHeight+5">輸入幾個回車試試</textarea>
只有下劃線的文本框:
<input style="border:0;border-bottom:1 solid black;background:;">
軟體序列號式的輸入框:
<script for="T" event="onkeyup">
if(value.length==3)document.all[event.srcElement.sourceIndex+1].select();
</script>
<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T7" size="5" maxlength="3">
軟體序列號式的輸入框(完整版):
<script for="T" event="onkeyup">if(value.length==maxLength)document.all[event.srcElement.sourceIndex+1].focus();</script>
<script for="T" event="onfocus">select();</script>
<script for="Submit" event="onclick">
var sn=new Array();
for(i=0;i<T.length;i++)
sn=T.value;
alert(sn.join("—"));
</script>
<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">—<input name="T" size="5" maxlength="3">
<input type="submit" name="Submit">
㈦ html文件顯示成文本樣式了
可能是你的<html>標記前面有亂碼.你查看源代碼看看.把你的HTML代碼復制到一個文本文件,並且用正確的編碼保存.
㈧ 急!求大神告知html中文本域的樣式
你把文本域當成一個大點的文本框處理就行了,依據設計圖,可以這么寫:
textarea{
padding:5px10px;
line-height:1.6;
background:#fff;
border:1pxsolid#ccc;
}
㈨ html中 如何在<font>中設置字體樣式(粗體斜體等)
<!DOCTYPEhtml>
<htmllang="zh">
<head>
<metacharset="UTF-8">
<title>字體加粗</title>
<styletype="text/css">
*{
margin:0;
padding:0;
}
p{
text-align:center;
margin:16px0;
}
em{
/*去掉字體樣式*/
font-style:normal;
}
p.strong:nth-child(1){
font-weight:normal;
}
p.strong:nth-child(2){
font-weight:bold;
}
p.strong:nth-child(3){
font-weight:bolder;
}
p.strong:nth-child(4){
font-weight:lighter;
}
p.strong:nth-child(5){
/*等同於bold*/
font-weight:700;
}
p>em:only-child{
font-style:italic;
}
</style>
</head>
<body>
<hr>
<p>用<b>加粗字體:<b>加粗</b></p>
<hr>
<p>用<strong>加粗字體:<strong>加粗</strong></p>
<hr>
<pclass="strong">用CSSfont-weight加粗<em>normal(400)</em>, <em>bold(700)</em>
, <em>bolder</em>, <em>lighter</em></p>
<hr>
<p>用<i>斜體字體:<i>斜體</i></p>
<hr>
<p>用font-style:italic;斜體字體:<em>斜體</em></p>
<hr>
<p>用<i>斜體字體:<em>斜體</em></p>
</body>
</html>
可以自行試一下!!!
效果圖