box-shadow
-
例子
div{ width:300px; height:100px; background-color:yellow; box-shadow: 10px 10px 5px #888888; }
-
样式
text-align
用于设置文本在容器中的位置
- 可选值
text-indent
用于文本首行文字缩进
-
例子
<html> <head> <meta charset="utf-8"> <title>document</title> <style> p{text-indent:50px;} </style> </head> <body> <p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'</p> </body> </html>
-
样式
注意:
1、边框(border)下面也有背景
2、text-align对于文本内容有用因为文本内容是行内元素但是图片是行内块元素所以它无法对行内块元素进行定位图片可用margin来定位