- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 Bootstrap 的 12 网格系统之后,我如何将下面示例中的图像代码放在中心的 jumbotron text-centre
类下面?我将如何使用媒体查询来确保图像具有响应能力并适合所有设备和浏览器?
示例 1
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
<a href="http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg" target="_blank">
<img src="http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg" alt="picture of me" style="width:100%">
</a>
</div>
</div>
完整站点代码
<!DOCTYPE html>
<html lang="en">
<head>
<title>Liam Docherty Digital Portfolio</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<style>
.body {
font-family: "Lato", sans-serif
}
.img {
width: 100%;
height: auto;
}
.thumbmail {
display: flex;
justify-content: center;
align-items: center;
}
@media only screen and (min-width: 600px) {
.col-s-1 {width: 8.33%;}
.col-s-2 {width: 16.66%;}
.col-s-3 {width: 25%;}
.col-s-4 {width: 33.33%;}
.col-s-5 {width: 41.66%;}
.col-s-6 {width: 50%;}
.col-s-7 {width: 58.33%;}
.col-s-8 {width: 66.66%;}
.col-s-9 {width: 75%;}
.col-s-10 {width: 83.33%;}
.col-s-11 {width: 91.66%;}
.col-s-12 {width: 100%;}
}
@media only screen and (min-width: 768px) {
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}
}
</style>
<body>
<div class="container">
<div class="jumbotron text-center">
<h1>About Me</h1>
<p>Find out more about me!</p>
</div>
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
<img src="http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg" alt="Nature" style="width:100%">
</a>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<div class="well">
<h3>Who am I?</h3>
<p>My name is Liam Docherty and I'm 17 years old, currently studying at BLANK. In 2016 when I was taking my GCSE exams, I found my passion which was IT. My favourite topic within IT is software development. The reason how I found out this was my main passion with IT is because, I was assigned a task which was to create a website advertising myself to potential employees and really enjoyed learning multiple programming languages.</p>
<p>Overall, I have multiple experience within a range of different sectors within IT. For example, I have knowledge of installing and maintaining hardware and software in a technology system. Moreover, I have experience using application software such as Adobe Photoshop CS6, Adobe Premier Pro CS6 and Adobe Illustrator CS6.</P>
</div>
</div>
<div class="col-sm-4">
<div class="well">
<h3>Skills I can offer</h3>
<p>Front-end Development
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</p>
<p>Installing and maintaining hardware such as
<ul>
<li>Upgrading RAM</li>
<li>Installing network card</li>
<li>Using air duster to reduce dust build up in fan component</li>
</ul>
</p>
<p>Installing and maintaining software such as
<ul>
<li>Upgrading operating system</li>
<li>Installing anti-virus application software</li>
<li>Doing a defragment on hard drive</li>
</ul>
</p>
<p>Experience using application software such as...
<ul>
<li>Adobe Photoshop CS6</li>
<li>Adobe Premier Pro CS6</li>
<li>Adobe Illustrator CS6</li>
</ul>
</p>
</div>
</div>
<div class="col-sm-4">
<div class="well">
<h3>Future goals within IT</h3>
<p><ul>
<li>Improve my skills on using programming language javascript</li>
<li>Learn how to use Adobe After Effects to improve editing skills</li>
<li>Expand my knowledge on bootstrap</li>
</ul></p>
</div>
</div>
</div>
</div>
</body>
</html>
最佳答案
引用 http://bootsnipp.com 等网站上的 Bootstrap 文档和代码示例和 http://getbootstrap.com/getting-started/如果您迷失在任何 Bootstrap 代码中,将会对您有所帮助。
然而,要使图像在所有浏览器上响应,您需要添加类 class="img-responsive"
到 <img src tag
这与添加 style="width: 100%" height: "auto";
相同
为了使其具有响应性,您可以选择主要断点并按照您想要的方式设置样式。但是我对您的建议是利用所有 Bootstrap 标签和类,它可以简化您创建多个断点的工作,例如在中型设备上使用 col-md-12,在小型设备上使用 col-sm-12 在大型设备上使用 col-lg-12设备。
关于html - 使用 bootstrap 我该怎么做?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43023012/
stackoverflow如何得知JavaScript无法正常工作,并能够在页面顶部通知用户? 是否可以判断脚本是否未加载或产生错误,然后仍然能够使用JavaScript生成错误消息? 最佳答案
Xcode 项目方案共享...如何做到这一点? 当我将 Xcode 项目提交到 SVN 时,我发现我创建的方案保存在我的用户名文件夹下,例如 abc.xcodeproj/xcuserdata/_my_
我有这个 SQL: DROP TABLE MISSINGTABLE; CREATE TABLE MISSINGTABLE ( TABLE_NAME VARCHAR2 (70), DESCRIP
我是PHP OOP的初学者,并对使用PHP处理错误的正确方法有些疑问。 例如看这个功能: public function deleteFileFromDisk($fileNameToBeDeleted
YouTube上有很多视频,我们希望为网站访问者提供自动的YouTube成绩单对齐方式。我们想要的几乎就像this example。 但是,我们希望逐个句子对齐,而不是逐个单词自动对齐,例如this
假设,我有 IAsynchronous 接口(interface),它支持两种执行某些操作的方法(“开始/结束”模式): IAsyncResult BeginOperation(AsyncCallba
Hardware Product 1 Product 2 Product 3 Product 4 Product 5 我有这样的结构,我想做一个重新排序界面,用户可以通过单击向上箭头在层次结构中向
假设,我有 IAsynchronous 接口(interface),它支持两种执行某些操作的方法(“开始/结束”模式): IAsyncResult BeginOperation(AsyncCallba
我正在使用 Silverlight 2.0 Unleashed + Silverlight 4.0 Unleashed 学习 Silverlight,好吧,我只是在玩弄它:-) 作为其中的一部分,我正
有人可以解释一下我还是链接-我有512x512图标,但我不知道我需要创建什么图标大小以及如何将它们添加到我的iOS应用中。我需要什么尺寸以及如何添加尺寸? 最佳答案 简而言之:非视网膜iPhone或i
我想在 Java 中模拟以下情况,但我陷入困境: 特别是与客户、预订、航类预订和巴士预订相关的部分。我想要一组客户对象,每个对象都有自己的预订列表(可以是航类预订或巴士预订)。 我计划像下面的测试代码
我在 opencv、Pillow、ImageMagick、subprocess 和 ffmpeg 之间摇摆,作为操作图形数据的一种方式。 ImageMagick 看起来不错而且功能相当强大,但我在 W
我想做类似的事情 SELECT t.subtitle FROM temp t LEFT JOIN ep e ON e.subtitle=t.subtitle AND e.epi
Frame[] test = new Frame[3] {{2,5},{3,6},{4,7}}; 数组初始化器只能用在变量或字段初始化器中。尝试改用新表达式。 这怎么可能? 最佳答案 这里的问题是文字
我不知道如何正确创建第一个返回。它会像这样工作,但问题是 searchtestarrayone 总是有不同的长度,而且它可能非常大。几周前开始了我的 Swift 之旅,所以下面的代码中可能有一些愚蠢的
我有这样的表: NameSteve Martin PhoneXXX Bank account654861/46147 我对表格的相同部
我有一个关于单选按钮的快速问题,以及当用户返回页面时如何设置它们。我现在想要的是能够在他们返回页面时显示所选项目。同一组中有几个,所以我不能使用 getElementByID(遗憾!)。 这是我的 H
我做了一些事情: class Tuple1 { private T1 a; private T2 b; public Tuple1(T1 a, T2 b) {
我目前正在研究我在大学的期末项目,它看起来像 instagram。在 instagram android 应用程序中,您可以点击并按住图像和 boom,显示弹出窗口。但我不知道该怎么做! 最佳答案 您
我正在使用来自 mourner/suncalc 的函数这让我可以得到我们太阳的当前位置。使用 getPosition(),我想在图像上或使用纯 CSS(当然可以缩放到不同的屏幕分辨率和方向)创建动画,
我是一名优秀的程序员,十分优秀!