如何使文字在div中水平和垂直居中的css代码
CSS定义字体行间距line-height:xxpx;
CSS各种对齐代码,左对齐、右对齐、中间对齐、底部对齐、两端对齐等,代码简单,在此与大家分享:
/*CSS代码:*/ /*左对齐*/ .left { text-align: left; border: 1px dotted black; width: 50%; } /*右对齐*/ .right { text-align: right; border: 1px dotted black; width: 50%; } /*居中对齐*/ .center { text-align: center; border: 1px dotted black; width: 50%; } /*两端对齐*/ .justify { text-align: justify; border: 1px dotted black; width: 50%; }
参考:http://zhidao.baidu.com/link?url=gpkj0urG1l3_o4L2PbyVmHtqmA2Gc0xsCebGAZN_f1am_x7xgawGx0VQSqaegwyJerg6jvPUsOQnxh53vRMSz_
http://www.jb51.net/css/28142.html
相关推荐
qiupu 2020-11-04
多读书读好书 2020-11-03
RedCode 2020-10-28
jiedinghui 2020-10-25
Ladyseven 2020-10-22
hellowzm 2020-10-12
zuncle 2020-09-28
Ladyseven 2020-09-11
jiedinghui 2020-09-07
xiaohuli 2020-09-02
葉無聞 2020-09-01
impress 2020-08-26
ThikHome 2020-08-24
nicepainkiller 2020-08-20
hellowzm 2020-08-18