在CSS裡寫複雜的JavaScript指令碼

來源:互聯網
上載者:User


因為"{"和"}"和CSS裡的 "{"與"}"衝突.
好像也不能用引號,具體沒有測試.
這樣一來,在CSS裡寫指令碼就不具備靈活了,但是如果想寫一個複雜的指令碼到CSS裡,該如何處理呢?是一個問題,經測試,可以先定義一個函數,然後在expression裡調用就行了,不過由於在CSS裡用了expression,所以,只能在IE裡運行.
一下是樣本,點擊代碼可運行. xmlns="http://www.w3.org/1999/xhtml">


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.