html - 如何创建左侧图像和右侧内容
问题描述
这是针对内容下的桌面模式图像。在选项卡模式下,我需要在左侧图像和右侧内容等内容之后的图像。我正在使用引导程序 3 和 sass。
我已经为选项卡模式创建了这样的内容,但它对我来说无法正常工作:
div:nth-child(2),div:nth-child(3){
position: absolute;
right: 51px;
top: 95px;
width:50%;
}
<div class="col-md-3 col-xs-12 hiw-cols-first">
<picture>
<img class="hiw-tab-images" src="images/p-tab.png">
<img class="hiw-images" src="images/r-product.png">
</picture>
<div class="hiw_heading">Obtain your Product</div>
<div class="hiw-subpara">dable content of a page when looking at its layout. The point
of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as
opposed to using 'Content here, content here', making it look like readable English.
Many desktop </div>
</div>
我已经完成了桌面模式,但我需要标签模式的帮助,请任何人帮忙。
解决方案
在这种情况下,您可以使用flexbox
请检查以下代码段:
.hiw-cols-first {
display: flex;
align-items: flex-start;
justify-content: space-between;
}
<div class="col-md-3 col-xs-12 hiw-cols-first">
<picture>
<img class="hiw-tab-images" src="images/p-tab.png">
<img class="hiw-images" src="images/r-product.png">
</picture>
<div>
<div class="hiw_heading">Obtain your Product</div>
<div class="hiw-subpara">dable content of a page when looking at its layout. The point
of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as
opposed to using 'Content here, content here', making it look like readable English.
Many desktop </div>
</div>
</div>
推荐阅读
- angular - 如何仅在垫表的几行上显示编辑图标
- .net-core - Github Action DotNetCore sln 和项目在同一个文件夹中
- python - AttributeError:“str”对象没有“包含”属性
- angular - AWS Codepipeline 使用 --delete 标志部署到 S3
- android - 将两个数据类绑定到一个片段 - Android Kotlin
- algorithm - 查找 XOR 和为零的数组数量
- google-bigquery - 特殊组成员时的 BigQuery 数据集访问
- mongodb - mongo db 没有在 centos 7 上启动
- python - 是否有计算项目产品价值的循环?
- ios - Vapor 3.1.10 Xcode-11.3.1 编译问题