Johnrdorazio
Joined August 15, 2020
→Testing MobileDetect tags
Johnrdorazio (talk | contribs) No edit summary |
Johnrdorazio (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 40: | Line 40: | ||
In this very moment you seem to be using a <mobileonly>mobile</mobileonly><nomobile>desktop</nomobile> device. | In this very moment you seem to be using a <mobileonly>mobile</mobileonly><nomobile>desktop</nomobile> device. | ||
Here is an html structure that will only show on mobile: | Here is an html structure with block elements that should only show on mobile, using <code><mobileonly></code> tag: | ||
<mobileonly> | |||
<div style="background-color:yellow;color:darkblue;font-weight:bold;text-align:center;">I AM A MOBILE DEVICE!</div> | |||
</mobileonly> | |||
Here is a similar html structure with block elements that will only show on mobile, using <code><onlymobile></code> tag: | |||
<onlymobile> | <onlymobile> | ||
<div style="background-color:yellow;color:darkblue;font-weight:bold;text-align:center;">I AM A MOBILE DEVICE!</div> | <div style="background-color:yellow;color:darkblue;font-weight:bold;text-align:center;">I AM A MOBILE DEVICE!</div> | ||
</onlymobile> | </onlymobile> | ||
Here is a block element that should only show on desktop, using <code><nomobile></code> tag: | |||
<nomobile> | |||
<div style="background-color:yellow;color:darkblue;font-weight:bold;text-align:center;">I AM A DESKTOP DEVICE!</div> | |||
</nomobile> | |||
[[it:Utente:Johnrdorazio]] | [[it:Utente:Johnrdorazio]] |