开发者

Change Font Size On Detection Of IPad

开发者 https://www.devze.com 2023-03-28 11:51 出处:网络
I need a simple solution for changing the font size to slightly bigger when my joomla site is viewed on an iPad.

I need a simple solution for changing the font size to slightly bigger when my joomla site is viewed on an iPad. The solutions I have found so far involve either making a separate stylesheet, which I have done but have no idea how to activate once the page loads, or even loading a mobile v开发者_开发知识库ersion of the site, which seems overkill. Is there not some simple javascript snippet I could use that detects the presence of an iPad and then adjusts the font size accordingly?

Thanks.


Take a look at this link, you should set your font-size in the css. You can also see How to target CSS for iPad but exclude Safari 4 desktop using a media query? which may be of help.


@media screen and (max-device-width:1024px) and (width:1024px) {
    p {
        font-size: landscape font size
    }
}


@media screen and (max-device-width:1024px) and (width:768px) {
    p {
        font-size: portrait font size
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消