CSS伪类实现中间文字两边横线效果
来源:互联网 发布:vr 制作软件 编辑:程序博客网 时间:2024/05/02 01:14
利用CSS伪类实现中间文字两边横线效果
效果图:
实现代码:
<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>CSS伪类实现中间文字两边横线效果</title> <style> body { margin: 0; } .login_content { position: absolute; text-align: center; min-width: 450px; } .login_content div { font: 400 20px Helvetica, Arial, sans-serif; line-height: 20px; } /*CSS伪类用法*/ .login_content div:after, .login_content div:before { background: #000000; content: ""; height: 1px; position: absolute; top: 50%; width: 20%; } /*调整背景横线的左右距离*/ .login_content div:before { left: 0; } .login_content div:after { right: 0; } </style></head><body><div class="login_content"> <div>中间文字,两边横线</div></div></body></html>
阅读全文
4 0
- CSS伪类实现中间文字两边横线效果
- 中间文字,两边横线(纯css实现的哦)
- css样式,中间文字,两边横线
- 中间文字两边横线
- 中间文字,两边横线
- 文字中间加横线效果
- 文字中间加横线效果
- 两边横线,中间标题
- CSS伪类before,after制作左右横线中间文字效果
- text-decoration <del> <s> 实现横线从文字中间穿过的CSS效果属性和html标签
- 用伪类实现 两边横线、中间标题的样式
- css实现两边固定,中间自适应
- CSS文字左右两横线效果
- CSS文字左右两横线效果
- 横线中间添加文字
- css过滤选择器(示例--文字中间横线)
- 文字两边是横线的样式
- html 文字两边加横线\竖线
- 数据实体转换工具类
- Myeclipse报错:“Versions of Spring facet could not be detected”的解决方法
- 快速入门系列--NOSQL--05Redis也木有那么“高富帅”
- iOS开发常用的全局宏定义
- 6.14
- CSS伪类实现中间文字两边横线效果
- postman安装
- 快速入门系列--GIT版本控制工具
- solr导入csv文件
- Maven_Thrift 实例
- table中内容过长,table改变的问题
- 快速入门系列--TSQL-01基础概念
- 如鹰之歌
- 一天一道编程题之对称矩阵