Home Web Front-end HTML Tutorial 【7】Understand the basic case of Bootstrap grid system (2)_html/css_WEB-ITnose

【7】Understand the basic case of Bootstrap grid system (2)_html/css_WEB-ITnose

Jun 24, 2016 pm 12:05 PM
bootstrap Base grid Case system

ps. What I want to say this time is "Responsive column resets", but I don’t know why the Chinese official website does not provide a translation, but when I saw the case, I felt like this It's like a bug. Let me call this a high-level bug for my own convenience. If you have other good opinions, please tell me.

============================================== ================================================== ===

Responsive column resets means that at certain thresholds, some columns may appear higher than others. This situation may not be what you want. It is recommended to use a combination of .clearfix (clearing floats) and the responsive tool classe.

I won’t talk about cleaning the floats. Anyone with a certain foundation should know it. As for responsive tools Classe will talk about it later (you can go to the Chinese official website to see it), but here is to let everyone know that there is such a highly buggy situation.

============================================== ================================================== ===

Post the code directly

<!DOCTYPE html><html lang="zh-cn"><head>    <meta charset="utf-8">    <!-- Bootstrap不支持IE的兼容模式,加入此标签以确保在每个被支持的IE浏览器中保持最好的页面展现效果 -->    <meta http-equiv="X-UA-Compatible" content="IE=edge">    <!-- 由于Bootstrap 3是移动设备优先,加入此标签是为了确保适当的绘制和触屏缩放 -->    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>Bootstrap-Template-04</title>    <!-- 最新 Bootstrap 核心 CSS 文件 -->    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->    <!--[if lt IE 9]>        <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>        <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>    <![endif]-->    <style>.show-grid { margin-top: 15px; }.show-grid [class^="col-"] {  padding-top: 10px;  padding-bottom: 10px;  background-color: #eee;  border: 1px solid #ddd;}    </style></head><body><div class="container"><h1>Responsive column resets<small>我自己叫这个是高度bug</small></h1><div class="row show-grid">  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3<br>内容要多多---内容要多多---内容要多多---内容要多多---内容要多多---内容要多多</div>  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div></div></div>    <!-- 所有 Bootstrap 插件都依赖 jQuery,因此jQuery必须在Bootstrap之前引入 -->    <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->    <script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script></body></html>
Copy after login

Let’s first take a look at the renderings of this under the large screen sm plan (the sm plan is 3 3 3 3 =12, exactly one line)

From this picture, we can see at a glance that there is too much content at the front, which increases the height. What is the effect under the xs scheme (xs scheme is 6 6= 12 rows, 2 rows in total)

The first effect:

The second effect

Through compression In the browser, we saw 2 effects, but neither one is the effect we want. At this time, do you feel that there is a bug? I think so. The official website provides a solution (use .clearfix (cleanup) Floating) and a combination of responsive tool classes)

Let’s take a look at the modified code (I only post the main parts)

<div class="row show-grid">  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3<br>内容要多多---内容要多多---内容要多多---内容要多多---内容要多多---内容要多多</div>  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>  <!-- 在某些阈值时,某些列可能会出现比别的列高的情况。这个情况可能不是你所要的,建议使用.clearfix(清理浮动)和响应式工具classe的组合 -->  <div class="clearfix visible-xs"></div>  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div></div>
Copy after login

Now let’s take a look at the effect

This is exactly what the xs plan looks like, haha.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CUDA's universal matrix multiplication: from entry to proficiency! CUDA's universal matrix multiplication: from entry to proficiency! Mar 25, 2024 pm 12:30 PM

General Matrix Multiplication (GEMM) is a vital part of many applications and algorithms, and is also one of the important indicators for evaluating computer hardware performance. In-depth research and optimization of the implementation of GEMM can help us better understand high-performance computing and the relationship between software and hardware systems. In computer science, effective optimization of GEMM can increase computing speed and save resources, which is crucial to improving the overall performance of a computer system. An in-depth understanding of the working principle and optimization method of GEMM will help us better utilize the potential of modern computing hardware and provide more efficient solutions for various complex computing tasks. By optimizing the performance of GEMM

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Jul 30, 2024 pm 02:17 PM

On July 29, at the roll-off ceremony of AITO Wenjie's 400,000th new car, Yu Chengdong, Huawei's Managing Director, Chairman of Terminal BG, and Chairman of Smart Car Solutions BU, attended and delivered a speech and announced that Wenjie series models will be launched this year In August, Huawei Qiankun ADS 3.0 version was launched, and it is planned to successively push upgrades from August to September. The Xiangjie S9, which will be released on August 6, will debut Huawei’s ADS3.0 intelligent driving system. With the assistance of lidar, Huawei Qiankun ADS3.0 version will greatly improve its intelligent driving capabilities, have end-to-end integrated capabilities, and adopt a new end-to-end architecture of GOD (general obstacle identification)/PDP (predictive decision-making and control) , providing the NCA function of smart driving from parking space to parking space, and upgrading CAS3.0

How to introduce bootstrap into Eclipse How to introduce bootstrap into Eclipse Apr 05, 2024 am 02:30 AM

Introduce Bootstrap in Eclipse in five steps: Download the Bootstrap file and unzip it. Import the Bootstrap folder into the project. Add Bootstrap dependency. Load Bootstrap CSS and JS in HTML files. Start using Bootstrap to enhance your user interface.

How to introduce idea into bootstrap How to introduce idea into bootstrap Apr 05, 2024 am 02:33 AM

Steps to introduce Bootstrap in IntelliJ IDEA: Create a new project and select "Web Application". Add "Bootstrap" Maven dependency. Create an HTML file and add Bootstrap references. Replace with the actual path to the Bootstrap CSS file. Run the HTML file to use Bootstrap styles. Tip: Use a CDN to import Bootstrap or customize HTML file templates.

How to read the bootstrap mediation effect test results in stata How to read the bootstrap mediation effect test results in stata Apr 05, 2024 am 01:48 AM

Interpretation steps of Bootstrap mediation effect test in Stata: Check the sign of the coefficient: Determine the positive or negative direction of the mediation effect. Test p value: less than 0.05 indicates that the mediating effect is significant. Check the confidence interval: not containing zero indicates that the mediation effect is significant. Comparing the median p-value: less than 0.05 further supports the significance of the mediation effect.

750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth 750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth Apr 23, 2024 pm 03:28 PM

Regarding Llama3, new test results have been released - the large model evaluation community LMSYS released a large model ranking list. Llama3 ranked fifth, and tied for first place with GPT-4 in the English category. The picture is different from other benchmarks. This list is based on one-on-one battles between models, and the evaluators from all over the network make their own propositions and scores. In the end, Llama3 ranked fifth on the list, followed by three different versions of GPT-4 and Claude3 Super Cup Opus. In the English single list, Llama3 overtook Claude and tied with GPT-4. Regarding this result, Meta’s chief scientist LeCun was very happy and forwarded the tweet and

Always new! Huawei Mate60 series upgrades to HarmonyOS 4.2: AI cloud enhancement, Xiaoyi Dialect is so easy to use Always new! Huawei Mate60 series upgrades to HarmonyOS 4.2: AI cloud enhancement, Xiaoyi Dialect is so easy to use Jun 02, 2024 pm 02:58 PM

On April 11, Huawei officially announced the HarmonyOS 4.2 100-machine upgrade plan for the first time. This time, more than 180 devices will participate in the upgrade, covering mobile phones, tablets, watches, headphones, smart screens and other devices. In the past month, with the steady progress of the HarmonyOS4.2 100-machine upgrade plan, many popular models including Huawei Pocket2, Huawei MateX5 series, nova12 series, Huawei Pura series, etc. have also started to upgrade and adapt, which means that there will be More Huawei model users can enjoy the common and often new experience brought by HarmonyOS. Judging from user feedback, the experience of Huawei Mate60 series models has improved in all aspects after upgrading HarmonyOS4.2. Especially Huawei M

How to use bootstrap to test mediation effects How to use bootstrap to test mediation effects Apr 05, 2024 am 03:57 AM

The Bootstrap test uses resampling technology to evaluate the reliability of the statistical test and is used to prove the significance of the mediation effect: first, calculate the confidence interval of the direct effect, indirect effect and mediation effect; secondly, calculate the significance of the mediation type according to the Baron and Kenny or Sobel method. significance; and finally estimate the confidence interval for the natural indirect effect.

See all articles