Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
938 views
in Technique[技术] by (71.8m points)

html - What is the use of the offset in the bootstrap?

I am new to the bootstrap below is my code

<div class="col-lg-8 col-lg-offset-2">
  <div class="section-heading">
     <h2>About us</h2>
     <i class="fa fa-2x fa-angle-down"></i>
  </div>
</div>

So over here what these offset-2 will do?Is It compulsory to use??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The offset adds space to the left of your element.

Imagine your element is the "xxxx" in the examples below:

xxxx-------- (col-lg-4, no offset)

--xxxx------ (col-lg-offset-2 col-lg-4)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...