【发布时间】:2016-12-08 19:40:45
【问题描述】:
有一个 CTA 按钮,上面有这个小通知气泡:
我已设法将 2 号定位到正确的位置,但背景自身定位不正确:
这是我的 HTML:
<button type="button" class="btn btn-link center-block green" role="link" type="submit" name="op" value="Link 2">see our vacancies<sup class="notify">2</sup></button>
这是 CSS:
.btn-link.green {
margin-top: 65px;
text-decoration: none;
border: none;
background-color: #1dcb8b;
color: white;
padding: 15px 30px;
position: relative;
}
.notify {
position: absolute;
top: -7px;
right: -7px;
background: #1dcb8b;
width: 50px;
height: 50px;
border-radius: 100%;
border: 2px solid #052c57;
font-size: 1.3rem;
}
我做错了什么?感谢您的帮助。
【问题讨论】:
-
你能让你的代码可执行吗?
标签: css twitter-bootstrap css-position