html - 如何在不移动图像位置的情况下将图像上的整个文本移动到右侧?
问题描述
正在搜索但找不到我需要的答案,我很好。还在学习。希望有人可以帮助我。
例如,现在我的学习网站上显示的问题是:
我希望将标题和整段内容移动到右侧而不移动图像上的位置以获得此结果:
这是原始代码:
.intro-section {
color: #fff;
position: relative;
z-index: 17;
padding: 80px 0;
margin-top: -86px;
background: url(../images/img.jpg) no-repeat top center;
background-size: cover;
}
.intro-section h3 {
text-transform: uppercase;
font-weight: 700;
font-size: 24px;
}
.intro-section .image-holder {
margin-top: 50px;
overflow: hidden;
}
<div class="intro-section">
<div class="container">
<div class="row">
<div class="col-md-6">
<h1> title </h1>
content paragraph xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</div>
</div>
</div>
</div>
希望能在这里得到解答,谢谢帮助。
解决方案
添加这个col-md-offset-6
类col-md-6
<div class="intro-section">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-6">
<h1> title </h1>
content paragraph xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</div>
</div>
</div>
</div>
推荐阅读
- typescript - 如何使用语音识别填充所有离子表单字段?
- python - Python 错误:[ZeroDivisionError:除以零]
- amazon-s3 - presto 在 S3 中将多行映射到单个文件的选项是什么?
- javascript - moment.js 支持哪种格式的区域缩写
- scala - 比较和计算表中的值 - 使用 Scala 的 Spark
- python - 将 list 的元素从 [['a', 'b'], ['c', 'd']] 转换为 ['a b', 'c d']
- dynamics-crm - Microsoft Dynamics CRM,关联实体不提取记录
- python - 使用列表应用 sum() 方法时发生错误“int”对象不可调用
- ruby-on-rails - 在另一个项目中执行 rake 任务
- msbuild - Nuget 目标,如何将重命名的内容文件发送到解决方案输出文件夹?