Font size

1.设置大小 

<span style="font-size:24px;">e.g. <h1> 10px is equal to 10pixels</h1></span>
<!DOCTYPE html>
<html>
	<head>
		<title>First font size change</title>
	</head>
	<body>
		<p style="font-size: 10px"> Some text for you to make tiny! </p>
		<p style="font-size: 20px"> Some text for you to make normal size!</p>
		<p style="font-size: 40px"> Some text for you to make super big!</p>
	</body>
</html>

2.设置颜色

            
<!DOCTYPE html>
<html>
	<head>
		<title>Changing the colors!</title>
	</head>
	<body>
		<h1 style="font-size:16px;color:green">Big Heading</h1>
			<p style="color:violet">A giant bear and a little duck were friends.</p>
			<p style="color:red;font-size:10px">But the bear got hungry and ate the duck.</p>
	</body>
</html>

3.设置字体

<!DOCTYPE html>
<html>
	<head>
		<title>Loving the font changes</title>
	</head>
	<body>
		<h1 style="font-family: Arial">Big title</h1>
		 <ol>
		 	<li style="font-family: Arial;font-size:16px">This item is big Arial.</li>
		 	<li style="font-family: Verdana;font-size:12px">This item is medium Verdana.</li>
		 	<li style="font-family: Impact;font-size:10px">This item is small Impact.</li>
		 </ol>
	</body>
</html>


4.改变背景颜色
e.g. 

<p style="background-color: red;">Hello!</p>

5.左右中对齐:

<li style="text-align:left">The Hawthorn Football Club</li>	
				<li style="text-align:center">San Franscisco 49ers</li>
				<li style="text-align:right">Barcelona FC</li>

6.加粗文字 :

在要加粗的文字两边加上<strong>、</strong>

7.使文字倾斜:

在object两边加上<em>、</em>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值