<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>设置文字</title>
<style type="text/css">
.p1{
font-family: "Times New Roman",Arial;/*当浏览器没有前一种字体时,选择第二种字体*/
font-style: italic; /*设置为斜体*/
font-weight: bold; /*设置粗体 normal为不加粗*/
text-transform: capitalize;/*首字母大写 uppercase:全部大写 lowercase*/
font-size: 36px;/*字体大小*/
word-spacing: 50px; /*字词间距*/
}
.p2{
font-family: 微软雅黑,宋体,黑体;
text-decoration: underline; /*下划线*/
text-decoration: line-through; /*删除线*/
text-decoration: overline; /*上划线*/
text-decoration: overline line-through;
word-spacing: 50px; /*字词间距*/
}
.p3{
text-indent: 2em;/*段首空两个字*/
word-spacing: 100px; /*字词间距*/
line-height: 1.5; /*行距*/
border:1px solid red;
}
</style>
</head>
<body>
<p class="p1">study hard and make progress very day</p>
<p class="p2">好好学习,天天向上</p>
<p class="p3">Java是一种可以撰写跨平台应用软件的面向对象的程序设计语言。Java 技术具有卓越的通用性、高效性、平台移植性和安全性,广泛应用于PC、数据中心、游戏控制台、科学超级计算机、移动电话和互联网,同时拥有全球最大的开发者专业社群。</p>
</body>
</html>
css基础-文本样式
猜你喜欢
转载自blog.csdn.net/qecode/article/details/78306308
今日推荐
周排行