0
我正在尝试创建一个图片链接,其中包含用户可以点击以显示带指令的弹出窗口的问号字形。在图像顶部覆盖弹出窗口
现在,问号字形出现在底部,但理想情况下,我希望它恰好位于链接“我的信息”标题旁边。
我的代码如下所示:
a.picture {
margin: 20px 0;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: top;
}
a.picture > h3 {
margin: 0;
width: 100%;
text-align: center;
}
a.picture > h3 span {
display:block;
color: white;
font-weight: bold;
background: $blue;
padding: 10px;
}
<a ng-if="::(options.link_template == 'Picture')" ng-href="{{::data.href}}" class="picture {{::options.class_name}}" target="{{::data.target}}" >
<h3><span>{{::options.title}}</span></h3>
<img src="{{::options.picture}}" height="100%" width="100%"/>
<div><a tabindex="0" class="glyphicon glyphicon-question-sign" role="button" data-toggle="popover" data-placement="top" data-trigger="focus" title="My Information" data-content="This is what this link will display"/></div>
</a>
我有什么在CSS做为了使酥料饼的字形是旁边的标题?我尝试在标题旁边放置glyphicon类,但在链接中有链接似乎不起作用。
谢谢。
会右上角会满意吗?你可以[绝对定位](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning#Absolute_positioning),相对于'a.picture'。 – showdev