您的位置:首页 > Web前端 > CSS

CSS 文字两边加直线

2015-12-23 16:41 651 查看
<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>Examples</title>

<meta name="description" content="">

<meta name="keywords" content="">

<link href="" rel="stylesheet">

<!-- <script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>

<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> -->

<title>Float</title>

<style type = "text/css">

span

{

display: block;

position: relative;

border:1px solid green;

width: 1000px;

margin: 10px auto;

height: 1;

}

span p

{

display: block;

position: absolute;

left: 20px;

top: -40px;

/*margin: 0px 20px;*/

padding: 10px;

background-color: #fff;

}

</style>

</head>

<body>

<span>

<p>活动规则</p>

</span>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: