|
#1
|
||||
|
||||
|
Whatever I set .style.opacity to in Konqueror 3.5.1, it displays the element at full opacity, and trying to get .style.opacity always returns 0.
Is this a Konqueror bug? Does it apply to Safari as well? Is there a way around it?
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#2
|
||||
|
||||
|
I thought Konq used -KHTML-opacity. Somebody must. Safari (at least according to folks who use it that I have helped with the Ultimate Fade script) does respond to generic opacity, much in the same way (if not identically) as FF now does.
Back to Konq. Generally, if you set a property/value pair in a browser that doesn't support it, you can get any sort of return value when you query it later.
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#3
|
|||
|
|||
|
Quote:
Quote:
Quote:
Mike |
|
#4
|
||||
|
||||
|
Quote:
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#5
|
||||
|
||||
|
Quote:
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#6
|
||||
|
||||
|
Quote:
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#7
|
|||
|
|||
|
Quote:
I must have subconsciously glossed over that mistake: I read that assigning any value always makes the element opaque, but reading the value returns zero. Mike |
|
#8
|
||||
|
||||
|
Quote:
![]() Examples (consecutively executed, on a document with images): Code:
window.alert(typeof document.images[0].style.opacity); // string window.alert(document.images[0].style.opacity); // empty string window.alert(typeof document.images[0].style.KhtmlOpacity); // undefined window.alert(document.images[0].style.opacity = 0.5); // 0.5, but image remains totally opaque window.alert(document.images[0].style.opacity); // 0
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#9
|
|||
|
|||
|
Quote:
So, I was right the first time.I noticed a long time ago that Konqueror implements the getComputedStyle method of the defaultView property of the document object. However, calling that method always returns null, irrespective of the arguments passed to it. Safari, on the other hand, omits the method altogether. This may be a pattern that the Konqueror developers have decided to implement. To provide all of the properties of a particular interface, regardless of whether they're actually functional. I can't think of any other rational explanation, though if that is the approach they've decided to take, it's a rather stupid one. Out of curiosity, can you alter the opacity of any element using any method (CSS rules or the DOM) in the latest Konqueror? If not, then it would seem that the 3.4 documentation isn't that out-of-date at all. Quote:
Code:
alert(typeof document.images[0].style.getPropertyValue('-khtml-opacity'));
Mike |
|
#10
|
||||
|
||||
|
It returns a string. However, so does
Code:
window.alert(typeof document.images[0].style.getPropertyValue("Mr. Fish"));
![]() Quote:
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|