所以我尝试使用两列布局,一列用于文本,另一列仅用于图像。在桌面上一切看起来都很好,但在手机上查看时,图像列不会显示。我如何做到在移动设备上查看页面时,图像列是导航栏后的第一个部分,覆盖整个宽度,而不是垂直拆分,然后是文本列?
<div class="container-fluid">
<div class="row">
<!--Text Column-->
<div class="col-sm-6 sec-1">
<h1>Frank Kreutzer</h1>
<h2>Frontend Web Developer</h2>
<p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.</p>
</div>
<!--Image Column-->
<div class="col-sm-6 sec-2"></div>
</div>
</div>
这是本页的代码笔:https://codepen.io/Frankk97/pen/QBBNym/
如果您想要在所有设备上使用列布局,那么您应该使用类col-6
,而不是col-sm-6
。
如引导程序网格文档中所述,屏幕大小的选择器<576px是CCD_ 3。您使用的.col-sm
用于屏幕大小>=576px。
这是修改过的代码笔。
编辑
更新了代码笔,以显示图像覆盖整个宽度,并作为手机上的第一部分。更新了父div以使用bootstrap flex-
<div class="row d-flex flex-column-reverse flex-sm-row">
然后更新子div以覆盖移动设备上的全屏。
<div class="col-12 col-sm-6 sec-1">
为图像分区添加了一个新的类和媒体查询css。
<div class="col-12 col-sm-6 sec-2 image-section"></div>
@media screen and (max-width: 575px) {
.image-section {
height: 200px;
}
}
要显示图像,请在相应的div上设置一个高度。对于反向排列,请设置一个具有列反向的灵活方向的媒体查询。
使用以下样式的
@media (max-width: 576px) {
.sec-2 {
height: 300px;
}
}
它是必需的,因为您已经将该图像添加为背景图像。由于div没有内容,并且分辨率低于576px,所以它不会占用高度。因此,您需要在小屏幕中为该元素添加一些特定的高度。
还可以使用订单类更改设备上的订单。请参阅下面的用法。
我还删除了sec1
类,因为它不是必需的。
.navbar {
/*background: #031426;*/
}
.navbar li a {
color: #000;
transition: all 0.3s ease-in 0s, all 0.5s ease 0s;
}
.navbar li a:hover {
color: #E64BA7;
}
.content {
margin-top: 50px;
margin-bottom: 50px;
text-align: left;
}
.container-fluid {
background: #f1f1f1;
}
.sec-1 {
height: 100vh;
}
.sec-1 h2 {
color: #E64BA7;
}
.sec-2 {
background-image: url("https://frankkreutzer.com/assets/images/pink.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
@media (max-width: 576px) {
.sec-2 {
height: 300px;
}
}
footer {
background-color: #222;
color: #fff;
}
footer p {
text-align: center;
padding-top: 20px;
}
footer a:hover {
color: #E64BA7;
text-decoration: none;
}
footer ul {
width: 100%;
text-align: center;
margin-top: 20px;
padding-left: 0px;
}
footer li {
display: inline-block;
margin: 4px;
}
footer li a {
color: #fff;
display: block;
text-decoration: none;
/*border-bottom: medium none;*/
padding: 10px;
border-radius: 3px;
transition: all 0.3s ease-in 0s, all 1s ease 0s;
}
.icon {
background-color: #222;
background-repeat: no-repeat;
background-position: center center;
height: 5em;
width: 5em;
-webkit-transition: background-color 0.4s ease;
-moz-transition: background-color 0.4s ease;
-ms-transition: background-color 0.4s ease;
-o-transition: background-color 0.4s ease;
transition: background-color 0.4s ease;
}
.icon a {
display: block;
height: 100%;
width: 100%;
}
.facebook {
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgdmlld0JveD0iLTAuNyAtMC42IDEzNCAyNzgiPjxzdHlsZT4uc3R5bGUwe2ZpbGw6CSNGRkZGRkY7fTwvc3R5bGU+PHBhdGggZD0iTTgyLjYgNThjMCAwLTAuNy01LjUgNC40LTkuNmM1LjEtNCA5LjktMy43IDkuOS0zLjdjMTIuOS0xLjYgMjkuOCAyLjYgMjkuOCAyLjZsNS45LTQyLjdjMCAwLTU5LjctMTQuMy04NS45IDcuMkMyOS41IDI0LjUgMjkuMyA0My43IDI5LjMgNDMuN3Y0Ny43SDAuMmwtMC4yIDQyaDI5LjRsLTEuMSAxNDMuMWw1Mi44IDAuM2wwLjMtMTQzLjRoNDMuMWwyLjktNDEuOWwtNDUuMS0wLjJMODIuNiA1OHoiIGNsYXNzPSJzdHlsZTAiLz48L3N2Zz4=);
background-size: 25%;
}
.facebook:hover {
background-color: #3664A2;
}
.linkedin {
background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAtMC4zIDEwNSAxMDUiPjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0xLjcsMzQuNmgyMS43djY5LjdIMS43VjM0LjZ6IE0xMi42LDBjNi45LDAsMTIuNiw1LjYsMTIuNiwxMi42YzAsNi45LTUuNiwxMi42LTEyLjYsMTIuNkM1LjYsMjUuMSwwLDE5LjUsMCwxMi42QzAsNS42LDUuNiwwLDEyLjYsMCIvPjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0zNywzNC42aDIwLjh2OS41aDAuM2MyLjktNS41LDEwLTExLjMsMjAuNS0xMS4zYzIxLjksMCwyNiwxNC40LDI2LDMzLjJ2MzguMkg4Mi45VjcwLjRjMC04LjEtMC4yLTE4LjUtMTEuMy0xOC41Yy0xMS4zLDAtMTMsOC44LTEzLDE3Ljl2MzQuNUgzN1YzNC42eiIvPjwvc3ZnPg==);
background-size: 50%;
}
.linkedin:hover {
background-color: #007BB6;
}
.github {
background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAtMC40IDMyIDMzIj48cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMzIsMTZjMCw4LjgtNy4yLDE2LTE2LDE2QzcuMiwzMiwwLDI0LjgsMCwxNkMwLDcuMiw3LjIsMCwxNiwwQzI0LjgsMCwzMiw3LjIsMzIsMTYgTTIwLDI5YzUuNS0xLjgsOS41LTYuOSw5LjUtMTNjMC03LjUtNi0xMy41LTEzLjUtMTMuNUM4LjUsMi41LDIuNSw4LjUsMi41LDE2YzAsNi4xLDQsMTEuMiw5LjUsMTN2LTIuNWMtMy45LDAuOS00LjgtMS44LTQuOC0xLjhjLTAuNi0xLjYtMS41LTItMS41LTJjLTEuMy0wLjksMC4xLTAuOCwwLjEtMC44YzEuNCwwLjEsMi4xLDEuNCwyLjEsMS40YzEuMywyLjMsMy41LDEuNCw0LjIsMS4xYzAuMi0xLDEtMS4yLDEuMi0xLjNDOS44LDIyLjYsNiwyMS4zLDYsMTUuMmMwLTEuNywwLjYtMy4xLDEuNi00LjJjLTAuMi0wLjQtMC43LTIsMC4yLTQuMmMwLDAsMS4zLTAuNCw0LjMsMS42YzEuMy0wLjMsMi42LTAuNSwzLjktMC41YzEuMywwLDIuNywwLjIsMy45LDAuNWMzLTIsNC4zLTEuNiw0LjMtMS42YzAuOSwyLjIsMC4zLDMuOCwwLjIsNC4yYzEsMS4xLDEuNiwyLjUsMS42LDQuMmMwLDYuMS0zLjgsNy40LTcuMyw3LjhjMC42LDAuNCwxLjMsMS4zLDEuMywyLjhWMjl6Ii8+PC9zdmc+);
background-size: 60%;
}
.github:hover {
background-color: #6CC644;
}
.codepen {
background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iLTEuMiAtMS4yIDQwIDQwIj48cG9seWdvbiBmaWxsPSJub25lIiBwb2ludHM9IjkuMiwxNy4xIDkuMiwyMC40IDExLjcsMTguOCAiLz48cG9seWdvbiBmaWxsPSJub25lIiBwb2ludHM9IjEwLDIyLjMgMTcuOCwyNy41IDE3LjgsMjIuOSAxMy40LDIwICIvPjxwb2x5Z29uIGZpbGw9Im5vbmUiIHBvaW50cz0iMTguOCwxNi40IDE1LjIsMTguOCAxOC44LDIxLjEgMjIuMywxOC44ICIvPjxwb2x5Z29uIGZpbGw9Im5vbmUiIHBvaW50cz0iMTcuOCwx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MCwwLDAsMGMwLDAsMCwwLDAtMC4xYzAsMCwwLDAsMCwwYzAsMCwwLDAsMC0wLjFjMCwwLDAsMCwwLDBjMCwwLDAsMCwwLTAuMWMwLDAsMCwwLDAsMGMwLDAsMC0wLjEsMC0wLjFjMCwwLDAsMCwwLDBjMCwwLDAtMC4xLDAtMC4xdi03LjFDMzAuNCwxNS4yLDMwLjQsMTUuMSwzMC40LDE1LjF6IE0xOS44LDEwbDcuOCw1LjJsLTMuNSwyLjNsLTQuMy0yLjlWMTB6IE0xNy44LDEwdjQuN2wtNC4zLDIuOUwxMCwxNS4yTDE3LjgsMTB6IE05LjIsMTcuMWwyLjUsMS43bC0yLjUsMS43VjE3LjF6IE0xNy44LDI3LjVMMTAsMjIuM2wzLjUtMi4zbDQuMywyLjlWMjcuNXogTTE4LjgsMjEuMWwtMy41LTIuNGwzLjUtMi40bDMuNSwyLjRMMTguOCwyMS4xeiBNMTkuOCwyNy41di00LjdsNC4zLTIuOWwzLjUsMi4zTDE5LjgsMjcuNXogTTI4LjQsMjAuNGwtMi41LTEuN2wyLjUtMS43VjIwLjR6Ii8+PC9zdmc+);
background-size: 70%;
}
.codepen:hover {
background-color: #76DAFF;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Frank Kreutzer</title>
<link rel="icon" type="image/png" href="assets/images/logo.png" width="32" height="32">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.12/css/all.css" integrity="sha384-G0fIWCsCzJIMAVNQPfjH08cyYaUtMwjJwqiRKxxE/rx96Uroj1BtIQ6MLJuheaO9" crossorigin="anonymous">
<!--Custom CSS-->
<link href="assets/css/style.css" rel="stylesheet">
<!--Google Fonts-->
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Fjalla+One" rel="stylesheet">
</head>
<body>
<!--Start Header-->
<header>
<nav class="navbar navbar-expand-md">
<a class="navbar-brand" href="#">
<img src="assets/images/logo.png" width="64px" height="64px">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav ml-auto float-right">
<li class="nav-item">
<a class="nav-link" href="">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">Contact</a>
</li>
</ul>
</div>
</nav>
</header>
<!--End Header-->
<main role="main">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 order-2 order-sm-1">
<h1>Frank Kreutzer</h1>
<p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive
innovation via workplace diversity and empowerment.</p>
</div>
<div class="col-sm sec-2 order-1 order-sm-2"></div>
</div>
</div>
<div class="container content">
<h1>Test</h1>
<p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive
innovation via workplace diversity and empowerment.</p>
<p>Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content
in real-time will have multiple touchpoints for offshoring.</p>
<p>Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing
solely on the bottom line.</p>
</div>
</main>
<!-- Footer -->
<footer class="page-footer text-center">
<p>© Frank Kreuzter 2018</p>
<ul>
<li>
<div class="facebook icon">
<a href="https://www.facebook.com/frank.kreutzer.97" target="_blank"></a>
</div>
</li>
<li>
<div class="linkedin icon">
<a href="https://www.linkedin.com/in/frank-kreutzer-205443121?authType=NAME_SEARCH&authToken=i1OO&locale=en_US&trk=tyah&trkInfo=clickedVertical%3Amynetwork%2CclickedEntityId%3A505715045%2CauthType%3ANAME_SEARCH%2Cidx%3A1-1-1%2CtarId%3A1487182355694%2Ctas%3AFrank"
target="_blank"></a>
</div>
</li>
<li>
<div class="github icon">
<a href="https://github.com/frankkreutzer" target="_blank"></a>
</div>
</li>
<li>
<div class="codepen icon">
<a href="http://codepen.io/Frankk97/" target="_blank"></a>
</div>
</li>
</ul>
<li><a href="#about">Portfolio</a></li>
<li><a href="#portfolio">Blog</a></li>
<li><a href="#contact">Contact</a></li>
</footer>
<!--Custom JS-->
<script src="https://www.google.com/recaptcha/api.js"></script>
<!--Bootstrap Core JS-->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
对于移动设备:三列相等:从台式机开始并扩展到大型台式机,获得三个等宽列。在移动设备、平板电脑及以下设备上,列将自动堆叠。
h4 {
margin-top: 25px;
}
.row {
margin-bottom: 20px;
}
.row .row {
margin-top: 10px;
margin-bottom: 0;
margin-right: -15px;
margin-left: -15px;
}
[class*="col-"] {
padding-top: 15px;
padding-bottom: 15px;
background-color: #eee;
background-color: rgba(86,61,124,.15);
border: 1px solid #ddd;
border: 1px solid rgba(86,61,124,.2);
}
hr {
margin-top: 40px;
margin-bottom: 40px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<div class="row">
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4">.col-md-4</div>
<div class="col-md-4">.col-md-4</div>
</div>