标记应与文本对齐。
样式:
{
content: '\2713';
display: inline-block;
color: #990000;
float:right;
vertical-align: middle;
/*padding: 0 6px 0 0;
position: absolute;
right: 0;
top: 10px;*/
}
如何正确对齐?
答案 0 :(得分:0)
像这样更改css:
content: '\2713';
display: inline-block;
color: #990000;
float:right;
position: relative;
transform: translateY(-100%);
答案 1 :(得分:0)
.double {
border-style: double;
background-color:#50a8d8;
width:30%;
height:20px;
}
<!DOCTYPE html>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div class="double" style="padding:5px; color:white;" > Pan <i class="fa fa-check pull-right" aria-hidden="true" style="color:black"></i>
</div>
</body>
</html>