将图像定位到右侧,拖尾屏幕

时间:2018-02-03 03:58:05

标签: html css

我想将我的图像定位在屏幕上,并使其在任何分辨率或设备上显示。它需要是背景图像吗?

<section class="meet">
    <div class="meet01">
        <img src="img/keyboard.png" class="keyboard">
        <img src="img/blue_frame.png">
        <h1><strong>Hello.</strong></h1>
       <img src="img/mouse.png" class="mouse">
    </div>
</section>

enter image description here

1 个答案:

答案 0 :(得分:1)

<Style>
.oneh
{
float:right !important;
width:100%;
position:relative;
height:auto;
margin-right:-40% !important;
}
.meet01
{
width:100%;
overflow:hidden;
}
</style>
<section class="meet">
    <div class="meet01">
        <img src="img/keyboard.png" class="oneh keyboard">
        <img src="img/blue_frame.png">
        <h1><strong>Hello.</strong></h1>
        <img src="img/mouse.png" class="mouse">
    </div>
</section>