日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
DIV樣式中幾個特殊效果實現(xiàn)

本文和大家重點討論一下DIV樣式中一些特殊效果的實現(xiàn),比如cursor:它可以設置DIV上光標的樣式,clip:可以設置剪輯矩形,而DIV樣式filter:可以實現(xiàn)濾鏡效果,相信本文介紹一定會讓你有所收獲。

DIV樣式中一些特殊效果

1、cursor:設置DIV上光標的樣式。

2、clip:設置剪輯矩形。

例:

Code

 
 
 
  1. cursor:help;clip:rect(0px100px20px0px);line-height:20px;  
  2. overflow:auto;background-color:Yellow;position:absolute"> 
  3. div樣式測式howareyou.  
 
  •  
  • 說明:clip:rect(toprightbottomleft);設置上下左右的距離,但此時要把position指定為absolute??匆陨闲Ч?。

    3、filter:此DIV樣式可以實現(xiàn)濾鏡效果。

    例:

    Code

     
     
     
    1.  
    2. filter:alpha(opacity=50);opacity:0.5;  
    3. float:left;width:200px;height:200px;"> 
     
  • height:200px;float:left;"> 
  •  
  •  
  •  
  •  說明:設置透明度:opacity:value(FF專用,value的取值為0至1之間的小數(shù)),filter:alpha(opacity=value)(IE專用,value取值:0至100)。

    如果要有JavaScript改變DIV樣式的透明度可用下面的方法:

    FF中:document.getElementById('tdiv').style.opacity='0.9';

    IE中:document.getElementById('tdiv').style.filter='alpha(opacity=90)';

    *以下是濾鏡綜合的例子,將以下代碼復制到一個網(wǎng)頁文件中就可看到其效果,所以就不要加以說明了。#p#

    例:

    濾鏡綜合例子

     
     
     
    1.  
    2. #paneldivdiv  
    3. {}{  
    4. background-Color:yellow;  
    5. height:200px;  
    6. width:200px;  
    7. }  
    8.  
    9.  
    10. background-color:Blue;"> 
    11. startx=10,starty=10,FinishX=100,FinishY=100);opacity:0.5;"> 
    12. alpha效果:
       
     
  •  
  •  
  • blur效果:
     
  • add為1代表字有陰影,0代表字全部模糊。  
  • abcdefghijklmnopqrstuvwxyz  
  •  
  • onclick="this.style.backgroundColor='#ff0000'"  
  • ondblclick="this.style.backgroundColor='black';"> 
  • chroma效果:
     
  • 原為黃色,單擊變成紅色變成透明,雙擊變成黑色。  
  •  
  •  
  • fliph效果:
     
  • ABCDEFGH
     
  • IJKLMNOP
     
  • 此屬性在設置寬高后有效  
  •  
  •  
  • flipv效果:
     
  • ABCDEFGH
     
  • IJKLMNOP
     
  • 此屬性在設置寬高后有效  
  •  
  •  
  • gray效果:
     
  • abcdefghijklmn  
  •  
  •  
  • invert效果:
     
  • 背景色變成相反顏色,如黑變成白。  
  •  
  • lightstrength=20,phase=3,strength=10)"> 
  • wave效果:
     
  • Add:一般為1,或0。(0表示上下波浪)  
  •   Freq:變形值。(指定多少個波浪)  
  •   LightStrength:變形百分比。(變形后的陰影。)  
  •   Phase:角度變形百分比。(彎曲的角度)Strength:變形強度。  
  • (數(shù)值越大,DIV變形就越大。)  
  •  
  •  
  • xray效果:
     
  • sfasdfasdfasdfsadf  
  •  
  • (GradientType=0,StartColorStr='#B5CCFA',EndColorStr='#ffffff');"> 
  • progid:dximagetransform.microsoft.gradient效果:
     
  • endendendendendendendendendend  
  •  
  •  
  • Positive='1');width:200px;height:200px;"> 
  • dropshadow效果:
     
  • 此效果只有在不設置背景色時有效,這時Color指定的將成為背景色。  
  • 此時背上的字將是清晰的。positive為0時color將成為背景色,  
  • 為1時color只是文本投影的顏色。  
  •  
  • width:100px;height:100px;"> 
  • glow效果:
     
  • strength的光的強度0--100;此時不能設DIV的背景色。  
  •  
  • height:100px;text-transform:uppercase;color:black;"> 
  • mask效果:
     
  • 沒有明顯效果,不能設背景色。  
  •  
  • width:100px;height:100px;"> 
  • shadow效果:
     
  • abcdefghijklmn  
  •  
  • background-color:red;"> 
  • xray效果:
     
  • sfasdfasdfasdfsadf  
  •  
  • (GradientType=100,StartColorStr='#B5CCFA',EndColorStr='#ffffff');  
  • width:100px;height:100px;"> 
  • 漸變效果。  
  • endendendendendendendendendend  
  •  
  • Microsoft.Pixelate(maxsquare=5);  
  • width:100px;height:100px;"> 
  • lsksalsslalalalalalalal  
  •  
  • width:100px;height:100px;background-color:Yellow;"> 
  •  
  • 【編輯推薦】

    1. DIV樣式中一些特殊效果用法舉例
    2. DIV樣式中常用屬性用法指導
    3. CSS中border和clear兩大屬性用法揭秘
    4. 實現(xiàn)DIV居中布局三種途徑
    5. 解讀DIV CSS網(wǎng)頁布局中CSS無效十個原因

    標題名稱:DIV樣式中幾個特殊效果實現(xiàn)
    標題網(wǎng)址:http://www.dlmjj.cn/article/codicco.html

    其他資訊