【发布时间】:2023-04-01 00:43:02
【问题描述】:
我有一个如下所示的屏幕截图,我试图在 HTML、CSS 和 JS 中复制它。
The screenshot should remain the same both for mobile and desktop version。
此时,我正在处理向右对齐的三个点(如上图所示)。
我用 HTML 和 CSS 代码为它创建了一个fiddle。我为三个点创建了一个图像。我用来将三个点图像向右对齐的代码是:
HTML:
<div class="nav-top-searchbar">
<form>
<span class="fa fa-search searchicon" aria-hidden="true"></span>
<input type="text" name="search">
<img src="https://s9.postimg.org/d6s4xvykv/Ellipsis.png" id="ellipsis">
</form>
</div>
CSS:
#ellipsis {
top: -30px;
position: relative;
left: 1320px;
}
问题陈述:
fiddle 中的问题是当我在移动版中看到网页时,it is creating a white space all the way towards the right。我想知道我需要在上面的 CSS 代码/HTML 代码中进行哪些更改,以便在右侧看不到任何空白。
【问题讨论】:
标签: html css responsive-design css-position absolute