mobile-safari

iPhone Full Screen Image

南笙酒味 提交于 2019-12-14 03:42:27
问题 How do I go about making an image or section of the page full screen on the iPhone? I have an image that is 480 x 320 and I want to pull that up full screen on the iPhone but it has to be within a webpage so that I can make the image a link back to the previous page. Currently if I drop the image on a blank page and I open it up on the iPhone it just shows up in the top left corner. 回答1: I'd say set the viewport meta tag in your blank page so Safari knows to render the page at the right size.

How to fix linear-gradient on background image with opacity on mobile and desktop safari

六眼飞鱼酱① 提交于 2019-12-14 03:03:26
问题 In regards to these two questions: How to do equivalent of a linear-gradient with opacity on a seamless background image in CSS How to apply equivalent of linear-gradient with opacity on edges of non-repeated image It is showing up like this on desktop and mobile safari: The question is how to fix this and get it working on mobile and desktop safari. 来源: https://stackoverflow.com/questions/57246358/how-to-fix-linear-gradient-on-background-image-with-opacity-on-mobile-and-deskto

Clearing input element in mobile safari with javascript does not clear the ios autocorrect buffer

蓝咒 提交于 2019-12-14 00:59:37
问题 I have an <input type="text"> element. The user types a string and hits enter which clears the element via $('input').val('') . The problem apparently is that iOS still has the previous input string in its autocorrect buffer, so when you begin to type a new word and hit space, it sees the last word from the previous string and the first word from the new string as one 'word' and attempts to autocorrect it. Example: message1: hello there message2: well hi neighbor iOS sees: therewell on

Google maps marker not working on iphone

冷暖自知 提交于 2019-12-13 18:41:33
问题 The Google map info window will not appear when I click on a marker using the iphone. The same code works on the desktop on Android. I need the map hidden by default and then loaded in only when the user clicks the view map button as I want to keep the weight of the page down as this is for a mobile site. The click event handler is being fired as I put an alert on it and it worked. I think it might be something to do with the order of the code when I attacked the click handlers, but thats a

Playing html5 audio in ajax response in iOS

蹲街弑〆低调 提交于 2019-12-13 18:18:34
问题 After a lot of googling and researching, I have found out that iOS blocks autoplaying of html5 audio and video. Audio and Video can only be played as a response to a click event. Now, I have another problem. I run a music website with a lot of user generated playlists. After clicking play, I make an ajax request to fetch the track URLs, and then load them and play them. iOS doesn't consider this as a synchronous click event to play music, so the music doesn't start playing on clicking the

How to specify a font from javascript?

这一生的挚爱 提交于 2019-12-13 17:59:12
问题 I am trying to customize a view-src bookmarklet for iPad. This one is looking pretty good so far. But I want to make it just a little more readable: The Courier (New) font is a bit ugly even (especially?) on the retina display and I'd prefer any one of DejaVu Sans Mono, Monaco, Lucida Console, Bitstream Vera Sans Mono. I tried to modify the bookmarklet script by adding: pre.style.fontFamily = '"DejaVu Sans Mono", "Lucida Console", Monaco;'; It's not doing the trick. Perhaps prettyprint

iOS Safari - disable zoom

懵懂的女人 提交于 2019-12-13 12:28:32
问题 Im trying to disable a feature on mobile safari, but not really sure how to describe it. I am adding in a Jquery slider which supports the swipeleft() and swiperight() touch events. As such I want to disable the feature whereby when you swipe to the edge of a page, it shows the grey 'apple linen background' behind the site. This is interfering with the user experience and I want to fix my site in the center, so the user cannot pull it around within the 'browser space' Can anyone help? 回答1:

How to restrict browser view to Landscape on a mobile browser in HTML5?

假装没事ソ 提交于 2019-12-13 12:16:02
问题 How to restrict browser view to Landscape on a mobile browser in HTML5? On potrait view, it should display "Switch to landscape mode" and load when it is turned to landscape mode. 回答1: you can use the "onorientationchange" event of your browser. I extracted a working example from one of my testing projects: http://jsfiddle.net/r9b8D/ Its not exactly what you are looking for, but it shows the implementation of "onorientationchange". Copy the jsfiddle example to your host and navigate to the

No XSLTProcessor() support in Safari?

孤者浪人 提交于 2019-12-13 12:10:29
问题 For whatever reason, I can't get XSLTProcessor() to work all the time. Here is my JS: ... xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xmlRequest.responseXML); // Pass variables xsltProcessor.setParameter(null, "sectionNumber", section); xsltProcessor.setParameter(null, "entryNumber", elementNo); // Transform XML using XSL var resultDocument = xsltProcessor.transformToFragment(phonebookDump,document); // Append to document document.getElementById('three').appendChild

Overflow:hidden not working in safari browser

若如初见. 提交于 2019-12-13 05:50:06
问题 I applied Overflow:hidden to <body> and <html> tags to stop scrolling of page when popup element is clicked this property working fine for me in almost every browser but not in Safari I googled for this solution but cannot find a solution to this so please someone help me in solving this thanks in advance 回答1: Could you try adding the overflow to the Body and the HTML tag? html, body { overflow: hidden; } 来源: https://stackoverflow.com/questions/28407499/overflowhidden-not-working-in-safari