码迷,mamicode.com
首页 > Web开发 > 详细

上标、下标~不常用的 html 标签

时间:2016-12-05 19:33:34      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:nts   not work   div   lower   .com   链接   转换   ima   subscript   

<sup>上标 

<sub>下标

<small>小号字

<del> 删除线

技术分享======》技术分享

 

 

对应的 js 

stringObj.sup()  上标

stringObj.sub()  下标

stringObj.sub()  使用小字号显示

stringObj.strike() 使用删除线

 

 

彩蛋:

<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
	</head>
	<body>
		<script type="text/javascript">
			var txt = "z-one"

			document.write("<p>1、Big--大号字体: " + txt.big() + "</p>")
			document.write("<p>2、Small--小号字体: " + txt.small() + "</p>")

			document.write("<p>3、Bold--粗体: " + txt.bold() + "</p>")
			document.write("<p>4、Italic--斜体: " + txt.italics() + "</p>")

			document.write("<p>5、Blink--字符串闪动: " + txt.blink() + " (does not work in IE)</p>")
			document.write("<p>6、Fixed--以打印机文本显示: " + txt.fixed() + "</p>")
			document.write("<p>7、Strike--删除线: " + txt.strike() + "</p>")

			document.write("<p>8、Fontcolor--字体颜色: " + txt.fontcolor("Red") + "</p>")
			document.write("<p>9、Fontsize--字体大小: " + txt.fontsize(16) + "</p>")

			document.write("<p>10、Lowercase--转换为小写: " + txt.toLowerCase() + "</p>")
			document.write("<p>11、Uppercase--转换为大写: " + txt.toUpperCase() + "</p>")

			document.write("<p>12、Subscript--下标: " + txt+txt.sub() + "</p>")
			document.write("<p>13、Superscript--上标: " +txt+ txt.sup() + "</p>")

			document.write("<p>14、Link--链接: " + txt.link("http://www.cnblogs.com/z-one") + "</p>")
		</script>

	</body>

</html>

结果:

技术分享

 

上标、下标~不常用的 html 标签

标签:nts   not work   div   lower   .com   链接   转换   ima   subscript   

原文地址:http://www.cnblogs.com/z-one/p/6134824.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!