html - 以下 View 的 CSS 和 HTML

标签 html css

我只剩下 2 个标签,找不到解决方案。

enter image description here

我做了这么多的 HTML 和 CSS

<div id="incoming_call" class="bottom_toolbar_incoming_call" style="bottom:90px; position: fixed; right: 3px; z-index: 9999; height:45px; width:250px; background-color:lightgray;">

<img src="http://findicons.com/files/icons/766/base_software/128/circle_red.png" alt="Answer" style=" width:40px; height:40px;  display: inline-block; padding:2px; left:200px; position: relative;" id="Reject" />
<img src="http://findicons.com/files/icons/766/base_software/128/circle_green.png" alt="Answer" style=" width:40px; height:40px;  display: inline-block; padding:2px; left:100px; position: relative;" id="answer" />
</div>

最佳答案

我会像这样将图像放在 position:absolute div 中

#incoming_call{
  border: 2px solid black;
}
#call{
  color:green;  
}
#images{
  position:absolute;
  top:0px;
}
<div id="incoming_call" class="bottom_toolbar_incoming_call" style="bottom:90px; position: fixed; right: 3px; z-index: 9999; height:45px; width:250px; background-color:lightgray;">
  <div id="call">call from 7040</div>
  <div id="time">0:01</div>
  <div id="images">
    <img src="http://findicons.com/files/icons/766/base_software/128/circle_red.png" alt="Reject" style=" width:40px; height:40px;  display: inline-block; padding:2px; left:200px; position: relative;" id="Reject" />
    <img src="http://findicons.com/files/icons/766/base_software/128/circle_green.png" alt="Answer" style=" width:40px; height:40px;  display: inline-block; padding:2px; left:100px; position: relative;" id="answer" />
  </div>
</div>

关于html - 以下 View 的 CSS 和 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42549534/

相关文章:

html - 为 iPhone 或 iPad 创建 2 列或 4 列的样式表

html - 带有 id 和外部 css 样式表的表将无法工作或格式化

html - 使用 CSS 在边框中制作曲线

html - Bootstrap - 3 列全响应全高介绍页面

javascript - 当所有内容都已完成下载时检测到

jquery - 找到以下匹配类的元素

html - 如何将所有 "LF"字符转换为 "<br/>"标签并显示在HTML页面上

javascript - 拖放功能在触摸设备中不起作用?

html - 先垂直对齐 div 元素,再水平对齐下一列

css - rails Bootstrap wysihtml5 无法覆盖宽度