cross-browser

Background image stretch y-axis only, keep repeat-x

喜你入骨 提交于 2019-12-20 10:23:21
问题 I have an image set as a background image of a div. The DIV size is changing and inside their is the image which is a gradient. CSS: #scroller_shadow{ background-image:url(../img/ui/shadow.png); background-repeat:repeat-x; background-position:top; } I need a cross-browser solution for making the image fit the height of the div in the y-axis only, keeping the repeat-x. The DIV is being resized dynamically via JQuery. Their might be a cross-browser option using JQuery. I don't mind using

Browser support for eTags

痴心易碎 提交于 2019-12-20 10:01:12
问题 I'm working on getting my site to support the eTag/If-None-Match browser cache, but I'm not sure which browsers do/don't support it. Can anyone point me to a list? I can't imagine it's universal, but I haven't found anything that supports that claim. cheers, Mike 回答1: If-None-Match was Specified in HTTP 1.1 (June 1999): http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol According to Wikipedia: By March 1996, pre-standard HTTP/1.1

Alternatives to node webkit? (filesize of importance) [closed]

江枫思渺然 提交于 2019-12-20 09:17:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Whilst node-webkit is nice, the binaries on mac and linux are over 70MB for a hello world application. Unacceptable. Is there any cross platform library available that simply uses the system default browser? I don't really care if that's IE, or webkit, or ... ? I presume that way the binary would be much smaller

body.scrollTop vs documentElement.scrollTop vs window.pageYOffset vs window.scrollY

岁酱吖の 提交于 2019-12-20 08:56:30
问题 When trying to find out how much a web page has been scrolled from the top, which of these should one use: document.body.scrollTop , document.documentElement.scrollTop , window.pageYOffset , window.scrollY Which one(s) would I choose in these 2 separate scenarios: a) If I wanted maximum compatibility (across the main browsers used currently)? b) If I wanted code that was most standards compliant/future-proof/strict-mode-compatible (but didn't care about supporting old/non-standard browsers)?

Class Name not getting changed in IE 7, 8 and chrome

女生的网名这么多〃 提交于 2019-12-20 05:11:08
问题 I am trying to change class name of two elements during onload. Here is my code for the same : var browserName=navigator.appName; var tfElem = document.getElementById("TTlExpct"); var blTfElem = document.getElementById("BTLExpct"); if (browserName=="Microsoft Internet Explorer") { tfElem.className ="pn-tf"; blTfElem.className ="pn-tf active"; } else { tfElem.setAttribute('class', 'pn-tf'); blTfElem.setAttribute('class', 'pn-tf active'); } The else block takes care of the code if its not IE,

if browser CSS3

不羁岁月 提交于 2019-12-20 04:33:19
问题 How do we check to see if the browser browsing a webpage is CSS3 capable. I know how to check for which browser is coming in using PHP but how do we check specifically that the browser supports CSS3. Any ideas, Marvellous 回答1: PHP (and I imagine any other server-side technology) has no idea about a browser's CSS capabilities. However on the client side, you can use Modernizr and handle rendering of your page based on the guides it gives you about what CSS3 properties a browser supports. 回答2:

if browser CSS3

家住魔仙堡 提交于 2019-12-20 04:32:04
问题 How do we check to see if the browser browsing a webpage is CSS3 capable. I know how to check for which browser is coming in using PHP but how do we check specifically that the browser supports CSS3. Any ideas, Marvellous 回答1: PHP (and I imagine any other server-side technology) has no idea about a browser's CSS capabilities. However on the client side, you can use Modernizr and handle rendering of your page based on the guides it gives you about what CSS3 properties a browser supports. 回答2:

mousedown event on options in select is not working in IE, Is there any workaround?

落花浮王杯 提交于 2019-12-20 04:12:26
问题 This following code snippet is to avoid the need for ctrl-click in a multi-select box but it does not work in IE 8 . Is there any work around to achive the same in IE and other IE version? $('option').mousedown(function(e) { e.preventDefault(); $(this).prop('selected', !$(this).prop('selected')); return false; }); 回答1: I don't believe there's any way to get the mousedown or click event on an option element in IE8. If you really want the behavior you describe, I suggest that you use a

CSS Multi Line ellipsis Cross Browser

喜夏-厌秋 提交于 2019-12-20 03:43:19
问题 There is a "div" in my webpage that has fixed width and height. Following css only works with single line text: overflow: hidden; text-overflow: ellipsis; white-space: nowrap; How can I apply ellipsis on multiline text on the text inside that div using pure css with cross browser compatibility? 回答1: Try this example: display: block; /* Fallback for non-webkit */ display: -webkit-box; max-width: 400px; height: $font-size*$line-height*$lines-to-show; /* Fallback for non-webkit */ margin: 0 auto

What is the most “compatible” way of autoplaying sound?

三世轮回 提交于 2019-12-20 03:26:08
问题 I want to add a sound in my page that autoplays but it seems like all ways require some plugin or codex or idk so I'm not quite sure what is the best audio format and way to code it so it works for most users and browsers. Is there some way to works for most people? Thanks 回答1: you can use BGSOUND tag like this : <BGSOUND SRC="waitng2.wav" LOOP="2"> but only accepts WAV and MID formats. for MP3 formats you can use EMBED tag but in some browser need plugin to be played. <embed src="http://www