admin管理员组文章数量:1196346
I am trying to make a vertical rule disappear when my site loads on mobile. The issue that I am running into is that I cannot conditionally make it disappear. I want the vertical rule to disappear the webpage I am working on is on mobile.
From looking at the display property bootstrap docs I thought I would just need to do the following.
<div className='vr mx-3 d-sm-none'> </div>
However when inspect element and change my view to be a mobile phone I noticed that the vertical rule is still present. Is there a workaround for this?
I am trying to make a vertical rule disappear when my site loads on mobile. The issue that I am running into is that I cannot conditionally make it disappear. I want the vertical rule to disappear the webpage I am working on is on mobile.
From looking at the display property bootstrap docs I thought I would just need to do the following.
<div className='vr mx-3 d-sm-none'> </div>
However when inspect element and change my view to be a mobile phone I noticed that the vertical rule is still present. Is there a workaround for this?
Share Improve this question asked Jan 23 at 1:45 SolidSnacksSolidSnacks 393 bronze badges 1 |1 Answer
Reset to default -1Rich DeBourke's comment worked perfectly for me:
Bootstrap is a mobile-first framework. Use
d-none
to hide the vertical rule and included-med-block
to display the vertical rule on larger displays.
本文标签: reactjsControlling Visibility of a Vertical RuleStack Overflow
版权声明:本文标题:reactjs - Controlling Visibility of a Vertical Rule - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738530685a2093541.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
d-none
to hide the vertical rule and included-med-block
to display the vertical rule on larger displays. – Rich DeBourke Commented Jan 23 at 7:51