Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.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 CSS:空空间中图像div下的文本_Html_Css_Flexbox - Fatal编程技术网

Html CSS:空空间中图像div下的文本

Html CSS:空空间中图像div下的文本,html,css,flexbox,Html,Css,Flexbox,我试图修改默认的引导博客模板,以便在标题旁边添加一个小图像。 我设法用左边距添加了图像:auto但现在文本将不在其下,只使用卡的一半: .blog标题{ 线高:1; 边框底部:1px实心#e5; } .blog标题徽标{ 字体系列:“Playfair Display”,乔治亚州,“Times New Roman”,衬线; 字体大小:2.25rem; } .blog标题徽标:悬停{ 文字装饰:无; } h1、h2、h3、h4、h5、h6{ 字体系列:“Playfair Display”,乔治亚

我试图修改默认的引导博客模板,以便在标题旁边添加一个小图像。 我设法用
左边距添加了图像:auto但现在文本将不在其下,只使用卡的一半:

.blog标题{
线高:1;
边框底部:1px实心#e5;
}
.blog标题徽标{
字体系列:“Playfair Display”,乔治亚州,“Times New Roman”,衬线;
字体大小:2.25rem;
}
.blog标题徽标:悬停{
文字装饰:无;
}
h1、h2、h3、h4、h5、h6{
字体系列:“Playfair Display”,乔治亚州,“Times New Roman”,衬线;
}
.显示器-4{
字体大小:2.5rem;
}
@介质(最小宽度:768px){
.显示器-4{
字体大小:3rem;
}
}
.导航滚动条{
位置:相对位置;
z指数:2;
高度:2.75雷姆;
溢出y:隐藏;
}
.nav滚动条.nav{
显示:-网络工具包盒;
显示:-ms flexbox;
显示器:flex;
-ms-flex-wrap:nowrap;
柔性包装:nowrap;
垫底:1毫米;
页边顶部:-1px;
溢出-x:自动;
文本对齐:居中;
空白:nowrap;
-webkit溢出滚动:触摸;
}
.nav滚动条.nav链接{
填料顶部:.75rem;
填充底部:.75rem;
字体大小:.875rem;
}
.flex auto{
-ms-flex:0自动;
-webkit-box-flex:0;
flex:0自动;
}
.h-250{高度:250px;}
/*@介质(最小宽度:768px){
.h-md-250{高度:250px;}
} */
.边框顶部{边框顶部:1px实心#e5;}
.边框底部{边框底部:1px实心#e5;}
.box shadow{box shadow:0.25rem.75rem rgba(0,0,0,05);}
/*
*博客名称和描述
*/
.博客标题{
页边距底部:0;
字号:2rem;
字体大小:400;
}
.博客描述{
字号:1.1rem;
颜色:#999;
}
/*分页*/
.blog分页{
边缘底部:4rem;
}
.blog分页>.btn{
边界半径:2em;
}
.想象一下{
最大宽度:250px;
}
@介质(最小宽度:990px){
.想象一下{
最大宽度:350px;
}
}
@介质(最大宽度:767px){
.想象一下{
最大宽度:120px;
最大高度:90px;
边缘顶部:15px;
右边距:15px;
边界半径:4px;
}
}
@介质(最大宽度:320px){
.想象一下{
显示:无;
}
}
@介质(最大宽度:767px){
.卡片{
弯曲方向:行;
}
}

引导博客
11月12日

这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入。这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入。这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入


尝试将图像放在仅包含标题和日期的div中

像这样

<div class="row mb-2">
        <div class="col-md-12">
          <div class="card flex-md-row mb-4 box-shadow h-md-250">
            <div class="card-body">
              <!-- <strong class="d-inline-block mb-2 text-primary">World</strong> -->
              <div><h3>
                <a class="text-dark" href="#" width="50%;">Featured post</a>
              </h3>
                <div class="mb-1 text-muted">Nov 12</div>
               <img class="imagine" src="https://www.w3schools.com/css/paris.jpg"></div>
              <div style="width:100%">
              <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.This is a wider card with supporting text below as a natural lead-in to additional content.This is a wider card with supporting text below as a natural lead-in to additional content.</p>
            </div>
              <a href="#">Continue reading</a>
            </div>
          </div>
        </div>
      </div>
    </div>

11月12日

这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入。这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入。这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入


尝试将图像放在仅包含标题和日期的div中

像这样

<div class="row mb-2">
        <div class="col-md-12">
          <div class="card flex-md-row mb-4 box-shadow h-md-250">
            <div class="card-body">
              <!-- <strong class="d-inline-block mb-2 text-primary">World</strong> -->
              <div><h3>
                <a class="text-dark" href="#" width="50%;">Featured post</a>
              </h3>
                <div class="mb-1 text-muted">Nov 12</div>
               <img class="imagine" src="https://www.w3schools.com/css/paris.jpg"></div>
              <div style="width:100%">
              <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.This is a wider card with supporting text below as a natural lead-in to additional content.This is a wider card with supporting text below as a natural lead-in to additional content.</p>
            </div>
              <a href="#">Continue reading</a>
            </div>
          </div>
        </div>
      </div>
    </div>

11月12日

这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入。这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入。这是一张较宽的卡片,下面的支持文本作为附加内容的自然引入


我将标题和图像放在一个div中,在css下面添加了卡片标题css

.card-title{
  display: flex;
  align-items: center;
}
.card-title img{
  margin-left: auto;
}
。卡片标题{
显示器:flex;
对齐项目:居中;
}
.卡名img{
左边距:自动;
}
.博客标题{
线高:1;
边框底部:1px实心#e5;
}
.blog标题徽标{
字体系列:“Playfair Display”,乔治亚州,“Times New Roman”,衬线;
字体大小:2.25rem;
}
.blog标题徽标:悬停{
文字装饰:无;
}
h1、h2、h3、h4、h5、h6{
字体系列:“Playfair Display”,乔治亚州,“Times New Roman”,衬线;
}
.显示器-4{
字体大小:2.5rem;
}
@介质(最小宽度:768px){
.显示器-4{
字体大小:3rem;
}
}
.导航滚动条{
位置:相对位置;
z指数:2;
高度:2.75雷姆;
溢出y:隐藏;
}
.nav滚动条.nav{
显示:-网络工具包盒;
显示:-ms flexbox;
显示