Change Font Size On Detection Of 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
}
}
精彩评论