Sử dụng opactiy trên IE và FF 2008-02-27 06:24:26
<script>
function opacity(obj){
var isNav = navigator.appName == "Netscape";
if(isNav){
obj.style.opacity = 1;
}else{
obj.filters.alpha.opacity=100
}
}
</script>
<div style="width: 200px; border: 1px solid #ccc;opacity:0.4;filter:alpha(opacity=40)" onmouseover="opacity(this);">
<p>This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
</p>
</div>
function opacity(obj){
var isNav = navigator.appName == "Netscape";
if(isNav){
obj.style.opacity = 1;
}else{
obj.filters.alpha.opacity=100
}
}
</script>
<div style="width: 200px; border: 1px solid #ccc;opacity:0.4;filter:alpha(opacity=40)" onmouseover="opacity(this);">
<p>This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
</p>
</div>
<script>
function opacity(obj){
var isNav = navigator.appName == "Netscape";
if(isNav){
obj.style.opacity = 1;
}else{
obj.filters.alpha.opacity=100
}
}
</script>
<div style="width: 200px; border: 1px solid #ccc;opacity:0.4;filter:alpha(opacity=40)" onmouseover="opacity(this);">
<p>This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
</p>
</div>
function opacity(obj){
var isNav = navigator.appName == "Netscape";
if(isNav){
obj.style.opacity = 1;
}else{
obj.filters.alpha.opacity=100
}
}
</script>
<div style="width: 200px; border: 1px solid #ccc;opacity:0.4;filter:alpha(opacity=40)" onmouseover="opacity(this);">
<p>This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
</p>
</div>
Tra loi 3 comment(s) 2008-02-27 06:24:26
gaulucky92 2008-02-27 11:02:06
Tra loi
TG 2008-02-28 12:12:53
Tra loi
gaulucky92 2008-02-28 09:41:24
Mà sao IE củ chuối quá, trong CSS chỉ cần cho thêm setting div.text:Hover là chạy ngon trên FF, còn IE lại ko dc...
Thế nên trên net người ta chửi IE quá trời... :D
Tra loi
Y kien