<div class="soild_text_one">
<fieldset>
<legend>历史活动一</legend>
</fieldset>
</div> <div class="soild_text_two">
<hr/><span>历史活动二</span><hr/>
</div> <div class="soild_text_three">
历史活动三
</div>
.soild_text_one{
width:500px;
margin:0 auto;
fieldset{
height: 500px;
border-left: none;
border-right: none;
border-bottom: none;
color: #009688;
border-color: #defffc;
height:20px;
legend{
text-align: center;
padding: 0 10px;
font-size: 14px;
}
}
} .soild_text_two{
text-align:center;
width:500px;
margin:0 auto;
height:20px;
font-size: 14px;
color: #4caf50;
hr{
width:200px;
display:inline-block;
vertical-align:middle;
border-color: #e4ffe6;
}
span{
padding: 0 10px;
}
} .soild_text_three{
position:relative;
text-align:center;
width:500px;
margin:20px auto;
height:20px;
font-size: 14px;
color:#ff9800;
&::before,&::after{
content:"";
position:absolute;
top:50%;
border:solid 1px #fbdfb6;
width:40%;
}
&::before{
left:;
}
&::after{
right:;
}
}

可以点击看具体展示效果:试一试

效果图如下

css 两边是线,中间文字的多种实现方法的更多相关文章

  1. CSS 两边是线 中间是文字的效果

    刚开始做的时候 想了一下 这个是怎么做出来的,后来在网上看到有个类似的效果,研究一下 <!DOCTYPE html> <html lang="en"> &l ...

  2. css中的线及vertical-align

    行内元素格式化顺序: 相关概念:  leading(行间距):指填充在两行文字间的铅条,等于line-height 和 font-size之差,其中一半leading加到文字上方,另一半leading ...

  3. C#使用 DirectX SDK 9做视频播放器 并在视频画线添加文字 VMR9

    视频图像处理系列 索引 VS2013下测试通过. 在百度中搜索关键字“DirectX SDk”,或者进入微软官网https://www.microsoft.com/en-us/download/det ...

  4. CSS实现背景透明,文字不透明(各浏览器兼容)

    /*CSS*/.waps{ background:url(07158.bmp) no-repeat top center fixed; width:1004px; text-align:center; ...

  5. 如何利用CSS代码使图片和文字在同一行显示且对齐

    对于初学css的新手朋友来说,经常会遇到这样一个问题,当文字和图片出现在同一行或者同一个div里面的时候,在浏览器中运行出来的显示效果往往是在不同的行,那么,我们怎么才能利用CSS代码使图片和文字在同 ...

  6. CSS实现背景透明,文字不透明(各浏览器兼容) (转)

    /*CSS*/ .waps{ background:url(07158.bmp) no-repeat top center fixed; width:1004px; text-align:center ...

  7. CSS制作波浪线

    建议先去了解清楚了径向渐变,线性渐变的用法先 这个作者的css制作波浪线讲解很不错额:https://www.jianshu.com/p/8570433e3669不理解的可以看看这个链接的额 可以去菜 ...

  8. 利用css去除input按钮上的文字的几种方法

    相信很多时候input上的文字困扰着web前端开发者,必须要通过修改html代码中的value值才能清空按钮上的文字,但很多人不愿意去动html代码,一方面麻烦,另外主要的原因还在于保留文字对seo有 ...

  9. 使用html及CSS实现在table中文字信息超过5个隐藏,鼠标移到时弹窗显示全部:

    使用html及CSS实现在table中文字信息超过5个隐藏,鼠标移到时弹窗显示全部: <!DOCTYPE html><html lang="en">< ...

随机推荐

  1. FZU 2060 The Sum of Sub-matrices(状态压缩DP)

    The Sum of Sub-matrices Description Seen draw a big 3*n matrix , whose entries Ai,j are all integer ...

  2. docker--build自己的image

    通过container commit成image [root@localhost docker_test]# docker container commit #可以简写成docker commit a ...

  3. box2d——1.tiles瓦片积木

    [调试渲染]   将TestCpp里Box2DTestBed的GLES-Render.h/cpp加入到项目中.声明绘制变量:GLESDebugDrawmDebugDraw. [创建世界]   // 依 ...

  4. 浮点字符串转int类型报错,解决

    一,直接上代码,先转double,再强转int,看你是选择,舍入,还是直接取整数位 var a1 = "1500.76"; var a2 = Convert.ToDouble(a1 ...

  5. Ecplise无法启动“failed to create the JAVA Virtual Machine”

    打开Ecplise时报错:“failed to create the JAVA Virtual Machine”,java配制也没有问题,然后尝试运行eclipsec.exe,报错了另一个信息:“Co ...

  6. System.Net.Mail.SmtpException:不允许使用邮箱名称.

    使用SmtpClient发送邮件的时候,出现了如题错误. 解决方案: 将  SmtpClient.UseDefaultCredentials  属性设置为 true . 官方文档说明: Some SM ...

  7. Codeforces 353E 贪心

    题意:给你一张有向图,第i条边连接i号点和(i + 1) % n号点,问最多可以选择多少个点,使得这些点互相不可达. 思路:容易发现,如果某个边的集合点的数目大于等于2,那么就可以选出一个点,当然也可 ...

  8. 由hbase.client.scanner.caching参数引发的血案(转)

    转自:http://blog.csdn.net/rzhzhz/article/details/7536285 环境描述 Hadoop 0.20.203.0Hbase 0.90.3Hive 0.80.1 ...

  9. Update Vim to 8.0 in Ubuntu

    add PPA sudo add-apt-repository ppa:jonathonf/vim Update and Install sudo apt-get update sudo apt-ge ...

  10. C++11之列表初始化

    1. 在C++98中,标准允许使用花括号{}来对数组元素进行统一的集合(列表)初始化操作,如:int buf[] = {0};int arr[] = {1,2,3,4,5,6,7,8}; 可是对于自定 ...