Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何向抽象div添加响应性 。封面{ 背景色:#212129; 位置:相对位置; 宽度:100%; 身高:50%;} .个人资料{ 宽度:120px; 高度:120px; 位置:绝对位置; 底部:-60px; 左:64px; 背景色:黑色;} 收割台img{ 宽度:100%; 高度:100%;}_Html_Css_Responsive - Fatal编程技术网

Html 如何向抽象div添加响应性 。封面{ 背景色:#212129; 位置:相对位置; 宽度:100%; 身高:50%;} .个人资料{ 宽度:120px; 高度:120px; 位置:绝对位置; 底部:-60px; 左:64px; 背景色:黑色;} 收割台img{ 宽度:100%; 高度:100%;}

Html 如何向抽象div添加响应性 。封面{ 背景色:#212129; 位置:相对位置; 宽度:100%; 身高:50%;} .个人资料{ 宽度:120px; 高度:120px; 位置:绝对位置; 底部:-60px; 左:64px; 背景色:黑色;} 收割台img{ 宽度:100%; 高度:100%;},html,css,responsive,Html,Css,Responsive,将img响应类添加到您的图像中 .cover{ background-color: #212129; position:relative; width:100%; height:50%;} .profile{ width:120px; height:120px; position:absolute; bottom:-60px; left:64px; background-color: black;} header img{ width:100%; height:100%;} <hea

将img响应类添加到您的图像中

.cover{
background-color: #212129;
position:relative;
width:100%;
height:50%;}

.profile{
width:120px;
height:120px;
position:absolute;
bottom:-60px;
left:64px;
background-color: black;}

header img{
width:100%;
height:100%;}

<header class="heading">        
    <div class="cover"><!--Main banner-->
        <img src="img/cover.jpg" alt="cover">

        <div class="profile">
            <img class="img img-thumbnail" src="img/dp.jpg" alt="profile">
        </div>
    </div>  
</header

.个人资料{
宽度:100%;
高度:120px;
位置:绝对位置;
底部:-60px;
左:64px;
背景色:黑色;}

将img响应类添加到图像中

.cover{
background-color: #212129;
position:relative;
width:100%;
height:50%;}

.profile{
width:120px;
height:120px;
position:absolute;
bottom:-60px;
left:64px;
background-color: black;}

header img{
width:100%;
height:100%;}

<header class="heading">        
    <div class="cover"><!--Main banner-->
        <img src="img/cover.jpg" alt="cover">

        <div class="profile">
            <img class="img img-thumbnail" src="img/dp.jpg" alt="profile">
        </div>
    </div>  
</header

.个人资料{
宽度:100%;
高度:120px;
位置:绝对位置;
底部:-60px;
左:64px;
背景色:黑色;}

您对响应式服务有何打算? 您的
.profile
容器的高度和宽度都设置了绝对单位(像素)和内部图像。配置文件将始终是100%的大而高,因此它是正常的,不会更改


您还应该为该容器使用百分比大小,或者使用一些媒体查询来为不同的视口定义不同的大小。

您打算如何使用响应式查询? 您的
.profile
容器的高度和宽度都设置了绝对单位(像素)和内部图像。配置文件将始终是100%的大而高,因此它是正常的,不会更改


您还应该为该容器使用百分比大小,或者使用一些媒体查询为不同的视口定义不同的大小。

添加宽度:100%;在Profile类中,不要为其指定固定宽度移除宽度:120px;在剖面类别中,增加宽度:100%;如果我加上100%的宽度,它占据了整个页面的宽度,变得令人毛骨悚然。给我你的网站截图,你可以使用引导网格。宽度:100%;在Profile类中,不要为其指定固定宽度移除宽度:120px;在剖面类别中,增加宽度:100%;然后它将工作良好,如果我添加100%的宽度,它占据了整个页面的宽度,并变得令人毛骨悚然给我你的网站屏幕快照,然后你可以使用引导网格