【发布时间】:2020-05-18 00:51:42
【问题描述】:
我想让图像完全位于屏幕的右侧和顶部。
body{
font-family: 'Roboto', sans-serif;
font-weight: 300;
background: #822B2B;
color: #ffffff;
overflow: hidden; }
#showcase{
display: flex;
justify-content: center;
align-items: center;
text-align: center;
/* margin-left: 116px; */
/* width: 180vh; */
height: 100vh;
background: url('https://images.pexels.com/photos/1402787/pexels-photo-1402787.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260') no-repeat center center / cover; }
如有任何需要澄清的问题,请随时提出。 代码在:https://codepen.io/zaidik/pen/WNQYbXz
【问题讨论】:
-
您能否发布 HTML 以便我们查看您的 CSS 的上下文
-
我得到了解决方案,我只需要包含 margin: 0;在体内。
标签: html css image background space