07_设置文本样式





html5

text {

border: medium solid red;
width: 400px;
background-color: lightgrey;
padding: 10px;
text-justify:

}

/* 处理空白
whitespace属性控制浏览器对空白字符的处理方式
*/

whiteText {

white-space: pre-line;

}

/* 指定文本方向 */

rtl {

direction: rtl;

}

ltl {

direction: ltr;

}

/* 指定单词,字母,行之间的间距 */

space {

letter-spacing: 10px;
word-spacing: 10px;
line-height: 30px;
border: thin solid red;

}

/* 控制断词
单词超过边界截断or不截断
*/

word {

word-wrap: break-word;
/*  word-wrap: normal; 默认*/
border: thin solid red;
height: 120px;
width: 130px;

}

/* 首行缩进 */

line {

text-indent: 10%;

}

/* 文本装饰与大小写转换 */

p6 {

text-decoration: blink;
text-transform: capitalize;

}

/* 创建文本阴影
text-shadow:水平偏移,垂直偏移 模糊程度 阴影颜色
*/

p7 {

text-shadow: 10px 20px 1px red;

}

/*################ 使用字体
font-family:设置字体,后面为备用字体
font-style:字体样式,斜体,假斜体,正常字体
font-weight:粗细程度
*/

p7 {

font-family: "微软雅黑", fantasy;
font-size: smaller;
font-style: italic;
font-weight: bold;

}

/* 使用web字体 */
@font-face{
font-family:MyStyle; /* 名字 */
src:url(“./cour.ttf”);/* 地址 */
}

p7 {

font-family: MyStyle, fantasy;

}




table: 指定对象作为块元素级的表格。类同于html标签(CSS2) inline-table:
指定对象作为内联元素级的表格。类同于html标签(CSS2) table-caption:
指定对象作为表格标题。类同于html标签<(CSS2)table-cell: 指定对象作为表格单元格。类同于html标签
table-row: 指定对象作为表格行。类同于html标签


start
end
left
right
justify
center

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值