<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div style="border:4px solid red">test</div> <div style="height: 48px; 200px; border: 1px solid burlywood; font-size: 18px; text-align: center; line-height:48px; font-weight: bold;" >testing</div> </body> </html>
边框:
- 宽度,样式,颜色(border:4px dotted red) --dotted虚线 solid实线
- border-left
- height 高度,像素
- width 宽度。像素,百分比
- text-align 水平方向居中
- line-height 垂直方向根据标签方向高度居中
- color 字体颜色
- font-size 字体大小
- font-weight 字体加粗