测试代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test</title>
<style>
a {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid #ddd;
text-decoration: none;
}
span {
float: right;
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: 12px;
font-weight: bold;
color: #fff;
line-height: 1;
vertical-align: baseline;
text-align: center;
background-color: #999;
border-radius: 10px;
}
</style>
</head>
<body>
<a href="script:;">Lorem ipsum dolor sit amet, consectetur adipisicing<span>2014年04月25日</span></a>
</body>
</html>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>float:hack</title>
<style>
.infos {
margin-right: 100px;
background: #f8f8f8;
text-align: justify;
padding: 10px;
}
.main {
width: 100%;
float: left;
border: 1px solid #d8d8d8;
background: #f8f8f8;
}
.tag {
clear: right;
float: left;
border-radius: 50px;
background: #e5e5e5;
font-size: 84%;
height: 30px;
line-height: 30px;
color: #06f;
margin-left: -95px;
margin-right: 15px;
top: 50%;
margin-top: 5px;
width: 80px;
text-align: center;
}
</style>
</head>
<body>
<div class="main">
<div class="infos">
The delete operator removes a property from an object.Unlike what common beliefs suggests, the delete operator has nothing to do with directly freeing memoryM
</div>
</div>
<div class="tag">verson5.2</div>
</body>
</html>