【Bootstrap Learning】-6 Sizing

1. 选择Documentation-- 选择Utilites --选择Sizing

2.相对宽度  w-25 w-50 w-75 w-100 w-auto mw-100

3.相对高度 h-25 h-50 h-75 h-100 h-auto mh-100

4. 

  <div class="container" style="width:50rem">
    <div class="p-3 bg-dark w-25">width-25%</div>
    <div class="p-3 bg-primary w-50">width-50%</div>
    <div class="p-3 bg-secondary w-75">width-75%</div>
    <div class="p-3 bg-success w-100">width-100%</div>
    <div class="p-3 bg-info w-auto">width-atuo</div>
    <div class="p-3 bg-warning mw-100">width-max-100%</div>
  </div>

5.

  <div class="container" style="height:500px">
    <div class="d-inline-block bg-dark h-25">height-25%</div>
    <div class="d-inline-block bg-primary h-50">height-50%</div>
    <div class="d-inline-block bg-secondary h-75">height-75%</div>
    <div class="d-inline-block bg-success h-100">height-100%</div>
    <div class="d-inline-block bg-info h-auto">height-atuo</div>
    <div class="d-inline-block bg-warning mh-100" >height-max-100%</div>
    <div class="d-inline-block bg-warning mh-100" style="height: 1000px;">height-max-100%</div>
  </div>

    如果是 mh-100,适用于本身的容器高度大于父容器高度的情况。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Key Features This book shows how to take advantage of the all new features introduced in Bootstrap Learn responsive web design and discover how to build mobile-ready websites with ease Find out how to extend the capabilities of Bootstrap with a huge range of tools and plugins, including jQuery, Do more with JavaScript and learn how to create an enhanced user experience Book Description Bootstrap, the most popular front-end framework built to design elegant, powerful, and responsive interfaces for professional-level web pages has undergone a major overhaul. Bootstrap 4 introduces a wide range of new features that make front-end web design even simpler and exciting. In this gentle and comprehensive book, we'll teach you everything that you need to know to start building websites with Bootstrap 4 in a practical way. You'll learn about build tools such as Node, Grunt, and many others. You'll also discover the principles of mobile-first design in order to ensure your pages can fit any screen size and meet the responsive requirements. Learn to play with Bootstrap's grid system and base CSS to ensure your designs are robust and that your development process is speedy and efficient. Then, you'll find out how you can extend your current build with some cool JavaScript Plugins, and throw in some Sass to spice things up and customize your themes. This book will make sure you're geared up and ready to build amazingly beautiful and responsive websites in a jiffy. What you will learn Fire up Bootstrap and set up the required build tools to get started See how and when to use Flexbox with the Bootstrap layouts Find out how to make your websites responsive, keeping in mind Mobile First design Work with content such as tables and figures Play around with the huge variety of components that Bootstrap offers Extend your build using plugins developed from JavaScript Use Sass to customize your existing themes About the Author Matt Lambert is a designer and developer with more than 16 years of experience. He currently works full-time as a senior product designer for CA Technologies in Vancouver, BC, Canada. In his free time, he is an author, artist, and musician. In 2005, Matt founded Cardeo Creative, which is a small web design studio based in Vancouver. He works with a select list of clients on a part-time basis while producing his own products on the side. To date, Matt has self-published three additional development books titled: Mastering Bootstrap, CSS3 Handbook, and the Freelance Startup Guide. He is also the author of Bootstrap Site Blueprints Volume II, Packt Publishing. Table of Contents Chapter 1: Introducing Bootstrap 4 Chapter 2: Using Bootstrap Build Tools Chapter 3: Jumping into Flexbox Chapter 4: Working with Layouts Chapter 5: Working with Content Chapter 6: Playing with Components Chapter 7: Extending Bootstrap with JavaScript Plugins Chapter 8: Throwing in Some Sass Chapter 9: Migrating from Version 3

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值