html - 如何使用引导程序 3 实现相对内容框?
问题描述
我是 bootstrap 和 css 的新手,因为我知道我必须创建两列 4 x 4 才能在一个部分中实现内容框,但是什么会让它看起来像上图一样,并让它在不同的设备中响应。
从昨天开始,我一直在努力,我已经实现了这个目标,但仍然无法使其完美。如图片中所述。
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<style>
.gradient-color {
background: linear-gradient(to left, #280489 20%, #e24301 100%);
background-clip: text;
text-fill-color: transparent;
color: transparent;
font-family: "HelveticaNeue";
font-weight: bold;
}
.left-btn {
float: left;
}
.first {
position: absolute;
background-color: white;
z-index: 4;
border: 3px solid red;
border-image: linear-gradient(to left, #280489 0%, #e24301 100%);
border-image-slice: 1;
height: auto;
padding: 52px 60px 64px 49px;
}
.second {
position: absolute;
width: 600px;
height: 400px;
right: 200px;
}
</style>
<div class="container">
<div class="row">
<div class="col-sm-12 text-center heading">
<h1>OUR STORY</h1>
<div class="smaller-border text-center"></div>
</div>
</div>
<div class="row">
<div class="col-sm-3 first ">
<p style="margin-bottom: 40px;">Sajaya Young Ladies was established under the name of Children Centers in 2004, and declared its independence in 2012, to focus on young ladies based on the vision of Her Highness Sheikha Jawaher bint Mohammad Al Qassimi.</p>
<a class="gradient-btn gradient-color" style="padding: 10px;">More Details</a>
</div>
<div class="col-sm-8 second">
<img src="https://preview.ibb.co/gdt5cK/Image_1.jpg" class="img img-responsive" alt="image">
</div>
</div>
</div>
解决方案
推荐阅读
- google-sheets - 在谷歌表格中创建列表
- android - 更改底部导航栏图标颜色?
- sas - SAS proc 导出不带逗号千
- javascript - 循环函数内的Javascript验证
- python - 识别df列name_pandas
- excel - 捕获 Excel VBA Slicer 点击事件
- reactjs - 反应所有类名在 map() 中受到影响
- javascript - 我的 React Native 应用程序出现问题:无法在未安装的组件上执行 React 状态更新
- reactjs - 我的 cssmodules 文件的边距不起作用
- email - keycloak 电子邮件模板使用客户端基础 url