Consider the following codes:
HTML
<div class="col-xs-3 col-sm-3"> <button type="button" class="btn btn-default btn-md btn-block"> <i class="fa fa-plus"></i> Add New Item</button> </div>
CSS
@media only screen and (max-width: 767px) { button { content: '<i class="fa fa-plus"></i>'; } }
If you resize the screen horizontally, at some point the text will exit the button.
I want to know if it is possible to automatically change the button text when resizing the horizontal screen. Something like “+ Add new item” only to the positive “+” signal on small devices.
I am a little noob with the media, so I think I missed something or did it wrong.
Can someone help me?
I made a script for this.
html css twitter-bootstrap media-queries twitter-bootstrap-3
Lord_Dracon
source share