2017-08-01 79 views

回答

0

阅读有关媒体查询:

<div class="row"> 
    <div class="col-lg-12 mystyle"> 
    <p> here is text </p> 
    </div> 
</div> 

CSS https://www.w3schools.com/css/css3_mediaqueries.asp

.mystyle p { 
 
    padding: 0 200px; 
 
    text-align: center; 
 
} 
 

 
@media screen and (max-width: 480px) { 
 
    .mystyle p { 
 
    padding: 0 20px; 
 
    text-align: center; 
 
    } 
 
}
<div class="row"> 
 
    <div class="col-lg-12 mystyle"> 
 
    <p> here is text </p> 
 
    </div> 
 
</div>

0

你可以用百分比,而不是最好会写媒体查询

我个人使用REM为单位,而不是PX(我个人的选择)

在媒体查询

它作为指定设备无论是最大宽度的宽度或最小宽度即

@media (max-width: 767px) { 
      .visible-xs { 
       display: inline-block !important; 
      } 

      .block { 
       display: block !important; 
       width: 100%; 
       height: 1px !important; 
      } 
     }