position: relative;

<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
text-decoration: none;
}
.wrap {
width: 190px;
height: 100px;
margin: 50px auto;
background-color:greenyellow;
/* padding-left: 12px;
padding-top: 15px;
padding-bottom: 12px;
padding-right: 20px; */
padding: 16px 20px 12px 15px;
box-sizing: border-box;
position: relative;
}
.wrap .top img {
float: left;
border-radius: 50%;
width: 40px;
height: 40px;
padding-right: 12px;
}
.a1 {
font-size: 13px;
line-height: 17px;
}
.a2 {
font-size: 12px;
line-height: 20px;
}
.a3 {
display: block;
width: 70px;
height: 25px;
font-size: 12px;
background-color: #e7201d;
line-height: 25px;
text-align: center;
color: white;
border-radius: 25px;
position: absolute;
}
.a4 {
display: block;
width: 70px;
height: 25px;
font-size: 12px;
background-color: #363634;
line-height: 25px;
text-align: center;
color: #f5ed87;
border-radius: 25px;
position: absolute;
left: 105px;
}
.wrap .bot {
padding-top: 12px;
text-align: center;
}
/* .wrap .bot{
float: left;
position: absolute;
} */
</style>
</head>
<body>
<div class="wrap">
<!-- 上 -->
<div class="top">
<img src="./images/logo.png" alt="">
<div class="a5">
<p class="a1">Hi~欢迎逛京东!</p>
<a class="a2">登录&nbsp;|&nbsp;注册</a>
</div>
</div>
<!-- 下 -->
<div class="bot">
<a class="a3" href="#">新人福利</a>
<a class="a4" href="#">PLUS会员</a>
</div>
</div>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值