引导 3.1.1 col-sm-offset-1 适用于 col-md-5



引导 col-sm-offset-1 正在应用于我的 md 大小的列。 是否有其他人遇到此问题,如果是,您是否找到了解决方法。 问题出在第二组列上。 col-sm-offset-1 不应该只适用于 col-sm-10,但它是。

<div class="row">
    <div class="col-md-5 col-md-offset-1  col-sm-5 col-sm-offset-1">
        <h3>Welcome to Parking Services Customer Support</h3>
        <p>We promise to provide you with the highest level of customer service everyday, our goal is to better understand the needs of our customers and quickly respond to your questions and comments. Contact us anytime; we look forward to hearing from
            you.
        </p>
        <p>We value our customers and provide the following value-added support:</p>
        <ul>
            <li>Experienced, trained, easy to reach support staff.</li>
            <li>Courteous and immediate response to all inquires.</li>
            <li>Convenient answers to questions via <a href="FAQ.aspx">Frequently Asked Questions</a>.</li>
        </ul>
    </div>
    <div class="col-md-5 col-sm-10 col-sm-offset-1">
        <h3>How to Contact UGA Parking Services</h3>
        <p>For inquiries about technical assistance, your My Parking Account, or our services not covered in the <a href="FAQ.aspx">FAQ</a>, contact us from 7:30am to 5:00pm, Monday to Friday.</p>
        <p class="text-center"> <a href="FeedbackForm.aspx" target="_blank" class="btn btn-primary">Feedback Form</a>
            <a href="AnonymousForm.aspx" target="_blank" class="btn btn-primary">Anonymous Form</a>
            <a href="mailto:%20parking@uga.edu" class="btn btn-primary">E-mail</a>
        </p>
        <br />
        <div class="col-md-6 col-sm-6">
            <p>Phone:</p>
        </div>
        <div class="col-md-6 col-sm-6">
            <p>
                Mailing Address:
                <br />address
            </p>
        </div>
    </div>
</div>

也许你没有正确理解这个smmd等等代表什么。它们指示它们应该保持网格的大小。如果您使用sm它将保持网格,直到腰围大于 786px。如果选择md它将是一个网格,直到窗口的宽度大于或等于 992px。

因此,如果您应用col-sm-offset-1它,偏移量将一直保持到网格小于 990px。

您必须编写自己的选择器,以便将此偏移量应用于小于 990px 的网格中的行。

@media (max-width: 990px){
   .only-sm-offset-1 {
       margin-left: 8.333333333333332%;
    }
}

示例:http://jsfiddle.net/3tX8R/1/

最新更新