һ
 ע

QQ¼

ֻһٿʼ

ƼĶ

+

[DIV] СǵCSSøд

[]
10510 happy175 2013-6-24 08:56:33
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴ûʺţע  

x
webҳоõĹܣССǵĸΪԽҵнǵĸ㣬һ𿴿ɣ
ǵģǼʵֵľϹܣDzǺ
HTML
  1. <div class="poptip">
  2.     <span class="poptip-arrow poptip-arrow-top"><em></em><i></i></span>
  3.     <span class="poptip-arrow poptip-arrow-right"><em></em><i></i></span>
  4.     <span class="poptip-arrow poptip-arrow-bottom"><em></em><i></i></span>
  5.     <span class="poptip-arrow poptip-arrow-left"><em></em><i></i></span>
  6.     Hi֪ <br>ǰD7ܿͷˣ
  7. </div>
ƴ
HTMLһĸļǣʵֻҪеһspanǩϵĴ벢ûôࡣ
CSS
  1. /* poptip */
  2. .poptip{position: absolute;top: 20px;left:20px;padding: 6px 10px 5px;*padding: 7px 10px 4px;line-height: 16px;color: #DB7C22;font-size: 12px;background-color: #FFFCEF;border: solid 1px #FFBB76;border-radius: 2px;box-shadow: 0 0 3px #ddd;}
  3. .poptip-arrow{position: absolute;overflow: hidden;font-style: normal;font-family: simsun;font-size: 12px;text-shadow:0 0 2px #ccc;}

  4. .poptip-arrow em,.poptip-arrow i{position: absolute;left:0;top:0;font-style: normal;}
  5. .poptip-arrow em{color: #FFBB76;}
  6. .poptip-arrow i{color: #FFFCEF;text-shadow:none;}

  7. .poptip-arrow-top,.poptip-arrow-bottom{height: 6px;width: 12px;left:12px;margin-left:-6px;}
  8. .poptip-arrow-left,.poptip-arrow-right{height: 12px;width: 6px;top: 12px;margin-top:-6px;}

  9. .poptip-arrow-top{top: -6px;}
  10. .poptip-arrow-top em{top: -1px;}
  11. .poptip-arrow-top i{top: 0px;}

  12. .poptip-arrow-bottom{bottom: -6px;}
  13. .poptip-arrow-bottom em{top: -8px;}
  14. .poptip-arrow-bottom i{top: -9px;}

  15. .poptip-arrow-left{left:-6px;}
  16. .poptip-arrow-left em{left:1px;}
  17. .poptip-arrow-left i{left:2px;}

  18. .poptip-arrow-right{right:-6px;}
  19. .poptip-arrow-right em{left:-6px;}
  20. .poptip-arrow-right i{left:-7px;}
ƴ
CSSдѾܼˣԲҪӶ࣬Ϊкǿչԡ
ϣǾʾ.poptip-arrowspanϼstyle="left:50%"style="top:50%"
IE6-10ChromeFirefoxȻԲصԺʵԡϤ֧վõҲǴ˷ʽ
Ȼųиõʵַʽ֪Ըߴңлл

תԣhttp://www.daqianduan.com/css-poptip/


css,
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
б

ֹ

²

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ ( ICP14013341-1

GMT+8, 2018-7-23 07:51

Powered by Discuz! X3.2

ԴԴվ  ԴAPPӦ֮

ٻظ ض б