当前第2页 返回上一页
在 HTML 4.01 中,不赞成使用 p 元素的 align 属性;在 XHTML 1.0 Strict DTD 中,不支持 p 元素的 align 属性。
请使用 CSS 代替。
CSS 语法:
1 | < p style = "text-align:right" >
|
html P标签的css样式的实例:
1.“ text-left ”、“ text-right ”、“ text-center ”属性控制<p>标签内容位置
1 2 3 | < p class = "text-left" >在左</ p >
< p class = "text-right" >在右</ p >
< p class = "text-center" >居中</ p >
|
2.“ text-lowercase ”、“ text-uppercase ”、“ text-capitalize ”属性控制<p>标签英文内容的大小写
1 2 3 | < p class = "text-lowercase" >hahahahhahahaha都小写</ p >
< p class = "text-uppercase" >hahahahhahahaha都大写</ p >
< p class = "text-capitalize" >hahahahhahahaha首字母大写</ p >
|
3.字体:“text-muted ”、“text-info ”、“text-success ”、“text-warning ”、“text-primary ”、“text-danger ”等属性,对不同情况下的内容进行不同颜色的标注
1 2 3 4 5 6 | < p class = "text-muted" >text-muted</ p >
< p class = "text-info" >text-info</ p >
< p class = "text-success" >text-success</ p >
< p class = "text-warning" >text-warning</ p >
< p class = "text-primary" >text-primary</ p >
< p class = "text-danger" >text-danger</ p >
|
4.背景:“bg-muted ”、“bg-info ”、“bg-success ”、“bg-warning ”、“bg-primary ”、“bg-danger ”等属性,对不同情况下的内容进行不同颜色背景的标注
1 2 3 4 5 6 | < p class = "bg-muted" >bg-muted</ p >
< p class = "bg-info" >bg-info</ p >
< p class = "bg-success" >bg-success</ p >
< p class = "bg-warning" >bg-warning</ p >
< p class = "bg-primary" >bg-primary</ p >
< p class = "bg-danger" >bg-danger</ p >
|
点击这里查看p标签的基础学习文章:html<p>标签是什么元素?关于html p标签的定义和作用详解
【小编的相关推荐】
html dir标签是干啥的?<dir>标签的具体定义和属性介绍
html noscript标签是什么意思?关于noscript标签的用法你了解多少?
以上就是html P标签为什么不能嵌套div?还有关于html P标签的css样式的实例介绍的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
input文本框如何实现添加提示文字,填写内容时消失
浅析html table表格的使用方法
html的img标签是如何使用的
html如何去掉超链接的下划线
html怎么添加css样式?
xhtml与html的区别是什么
向html中插入视频并兼容浏览器
html中的空格符号有哪些
html url是什么
html td什么意思
更多相关阅读请进入《p》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » html P标签为什么不能嵌套div?还有关于html P标签的css样式的实例介绍