opera

Future proof CSS hack for LTE Opera 10

醉酒当歌 提交于 2019-12-20 02:15:07
问题 I am currently using @media screen and (-webkit-min-device-pixel-ratio:0) to target Webkit browsers + Opera 9.2. Is there a safe* way to target Opera GTE 9.5 or LTE 10? * won't be picked up by another browser 回答1: That was hard but here it is. Works only in Opera gte 9.5 and lt 10.50: @media all and (resolution = 0dpi) { // exclude Opera 10.50 and higher :root #box { // you need to append :root to all selectors to exclude Opera lt 9.5 background: #f00; } } 回答2: * targets Opera 9 & below (and

获取所选元素的外部HTML

寵の児 提交于 2019-12-19 21:54:08
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我正在尝试使用jQuery获取选定对象的HTML。 我知道 .html() 函数; 问题是我需要包含所选对象的HTML(在这种情况下为表格行,其中 .html() 仅返回行内的单元格)。 我四处搜寻,发现了一些克隆对象,将其添加到新创建的div等中的非常“ hackish”类型的方法,等等,但这似乎很脏。 有没有更好的方法,还是新版本的jQuery(1.4.2)提供了任何一种 outerHtml 功能? #1楼 $("#myNode").parent(x).html(); 其中“ x”是节点号,第一个从0开始,如果您要获取特定的节点号,则应该得到所需的正确节点。 如果您有子节点,那么您实际上应该在想要的节点上放置一个ID,而在该节点上仅输入零。 使用这种方法,没有“ x”适合我。 #2楼 我认为目前(2012年5月1日),所有主流浏览器都支持externalHTML函数。 在我看来,此片段就足够了。 我个人会选择记住: // Gives you the DOM element without the outside wrapper you want $('.classSelector').html() // Gives you the outside wrapper as well only for the

<pre> tag making browsers close paragraphs

人走茶凉 提交于 2019-12-19 18:53:10
问题 I'm having an issue with the HTML below: <html> <body> <p style="font-size: large"> Some paragraph text <span><pre style="display:inline">some span text</pre></span> additional paragraph text that continues ... </p> </body> </html> So this is just a paragraph that contains some preformatted text in the middle. The problem that I am having is that both Opera and Chrome don't display this the way I expect. Specifically they close the paragraph tag before the span and force a new line. WTH?!

<pre> tag making browsers close paragraphs

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 18:51:25
问题 I'm having an issue with the HTML below: <html> <body> <p style="font-size: large"> Some paragraph text <span><pre style="display:inline">some span text</pre></span> additional paragraph text that continues ... </p> </body> </html> So this is just a paragraph that contains some preformatted text in the middle. The problem that I am having is that both Opera and Chrome don't display this the way I expect. Specifically they close the paragraph tag before the span and force a new line. WTH?!

Why is text rendered with a greater font-size in Opera?

拟墨画扇 提交于 2019-12-19 16:51:30
问题 I'm working on an HTML page that needs to be more or less pixel-perfect, and I noticed that in Opera 10, fonts are rendering larger than they do in other browsers, even though the font-size is effectively the same. Please see this example page in Opera 10 and another browser like Firefox 3.6: http://troy.onespot.com/static/stack_overflow/opera_font_size.html Alternatively, here's a screenshot that illustrates the issue: http://skitch.com/troywarr/d47m1/font-size The red boxes behind the "50px

在调试时或从JavaScript代码中如何在DOM节点上查找事件侦听器?

巧了我就是萌 提交于 2019-12-19 12:05:54
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我有一个页面,其中一些事件侦听器附加到输入框和选择框。 有没有一种方法可以找出哪些事件侦听器正在观察特定的DOM节点以及针对哪个事件? 使用以下事件附加事件: 原型的 Event.observe ; DOM的 addEventListener ; 作为元素属性 element.onclick 。 #1楼 (由于 此问题 很重要,因此请重写 此问题 的答案。) 调试时,如果您只想查看事件,我建议... 视觉事件 Chrome开发人员工具的“ 元素” 部分:选择一个元素,然后在右下角查找“事件监听器”(与Firefox类似) 如果要在代码中使用事件,并且正在使用 1.8之前的 jQuery,则可以使用: $(selector).data("events") 得到事件。 从1.8版本开始,不再使用.data(“ events”) (请参阅 此bug票据 )。 您可以使用: $._data(element, "events") 另一个示例:在指向控制台的特定链接上写入所有click事件: var $myLink = $('a.myClass'); console.log($._data($myLink[0], "events").click); (有关工作示例,请参见 http://jsfiddle.net/HmsQC

How to Wrap unspaces word for Opera Browser

牧云@^-^@ 提交于 2019-12-19 10:03:09
问题 I am currently testing this function in all browser using php. <style> #preview_desc{ text-wrap: suppress; word-break: break-all; word-wrap: break-word; /* IE>=5.5 */ white-space: -moz-pre-wrap; /* For Fx<=2 */ white-space: pre-wrap; /* Fx>3, Opera>8, Safari>3 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-line; width:158px; padding-left:5px; padding-right:5px; line-height:12px; font-family:'Arial', Helvetica, sans-serif; font-size:11px; text-align:justify; background:#f30000; }

Font awesome showing asian signs instead of icons

北城余情 提交于 2019-12-19 03:23:45
问题 i'm trying to use Font Awesome but instead of any icons it just displays any asian signs. I downloaded font awsome to by webserver for that. I tried this in 3 different browsers (firefox, opera and chromium) but it is always the same. A testpage can be seen here: http://2weitweitweg.de/test.html And here is a screenshot of it: http://postimg.org/image/9yh5p0p97/ Does it show the signs in your browser? Is the problem browser- or server-related? How can i fix it? bye 回答1: I had this problem and

Collection of Browser characteristics

混江龙づ霸主 提交于 2019-12-18 09:18:29
问题 I searching the Internet for an Page or an Book that collects the characteristics (Bugs/Features) of common Browsers. I get a lot of Information from several sites.. but is there some place for webdesigner that focusses on that issue? At the moment i am using Grails if that is an needed factor to answer my question. 回答1: quirksmode.org is pretty good for listing browser bugs and compatibility. Sitepoint's reference section is also pretty good. 回答2: The only place I know is this excellent

How to determine the Opera browser using JavaScript

梦想的初衷 提交于 2019-12-18 03:12:21
问题 I want to determine that the browser of the client machines in Opera or not using JavaScript, how to do that? 回答1: The navigator object contains all the info you need. This should do: navigator.userAgent.indexOf("Opera"); 回答2: Now that Opera uses the Chrome rendering engine, the accepted solution no longer works. The User Agent string shows up like this: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.132