html + css to achieve computer terminal display (hide) mobile terminal hide (show)

Two maps, computer display with the phone is not the same,

A computer browser, computer terminal display, the phone side hidden;

A mobile browsing, end the hidden computer, mobile terminal display;

This display can be adapted to achieve different effects.

html:

//sj
<div class="sjbdmap" style="text-align: center;">
<iframe width="318" height="649" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://j.map.baidu.com/s/GaKIFb"></iframe>
</div>
//pc
<div class="pcbdmap">
<div id="map" style="width:100%;height:500px;border:#ccc solid 1px;font-size:12px">
</div>

css:

.sjbdmap{display: none;}
@media (max-width: 768px){.sjbdmap{display: block !important;}}
.pcbdmap{display: block;}
@media (max-width: 768px){.pcbdmap{display: none;}

effect:

computer

Cellular phone

Guess you like

Origin www.cnblogs.com/chervehong/p/11058127.html