none
Visual Studio 2008 SP1中CSS IntelliSense建議 RRS feed

  • 問題

  • 之前在修改網頁的CSS都是使用PSPad, Notepad++之類的工具,比較少為了CSS開VS這個大炮級工具來使用。

    但近來因故使用VS來修改CSS檔案,發現CSS IntelliSense功能好像少支腳,在打「樣式」時並不會自動提示,而是打完樣式後面的「:」才會自己帶「樣式值」出來?

    請問其他大大有這樣的問題嗎?如果有,可否幫忙請MS修正一下。

    2009年4月24日 上午 03:28

解答

  • 打":"才會帶出樣式值, 這不是跟打"."出現下一個Class name一樣嗎?
    這是By Design, 如果有很多使用者跟您一樣的反應, 應該就會修改.


    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    • 已標示為解答 Lolota Lee 2009年4月27日 上午 05:06
    2009年4月27日 上午 05:06
  • 我也是一樣SP版本, 不過是Enterprise edition.
    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Enterprise


    您可以Check一下CSS的設定 :
















    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    • 已標示為解答 KKBruceMVP 2009年4月29日 上午 07:47
    2009年4月29日 上午 07:19
  • 功能正常了,回答如下:

    我的VS Pro灌好到現在沒有修改過設定值,應該是Enterprise與Professional的預設值不同,所造成。

    Professional差異如下:

    圖一:
    一般
    自動換行(未勾選 --> 修改「勾選」)
    顯示自動換行的視覺化圖像(S)(未勾選 --> 修改「勾選」)

    圖二:
    定位點
    縮排
    區塊(B) --> 修改「知慧型(S)」

    定位點
    插入空格(P) --> 修改「保留定位點」(K)

    圖四:
    格式:你設定什麼格式,就必須使用那種格式來輸入,且必須先輸入{,然後在{按Enter輸入…,輸入完後,才按},不能先按{},再回來輸入,不然就是
    1.要回到{後面再按一次Enter,
    2.到空白行按space,
    才會出現IntelliSense。

    非常感謝Lolota Lee。
    http://kkbruce.blogspot.com/
    • 已標示為解答 KKBruceMVP 2009年4月29日 上午 07:47
    2009年4月29日 上午 07:46

所有回覆

  • 打":"才會帶出樣式值, 這不是跟打"."出現下一個Class name一樣嗎?
    這是By Design, 如果有很多使用者跟您一樣的反應, 應該就會修改.


    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    • 已標示為解答 Lolota Lee 2009年4月27日 上午 05:06
    2009年4月27日 上午 05:06
  • 我的意思是,
    VS並不會自己帶出樣式的List ,例如,我們在打完
    #id {

    }
    後,在{}裡應該會先跳出「CSS樣式」如:border, background ...,然後按「:」再跳出「樣式值」;要「手打 」CSS樣式,是增強記憶 的不錯選擇,只是打錯字的機會高了點,或許99%的人都不會用VS來寫CSS吧,只是提個建議,有人幫忙提給MS就提,沒有人也就算了,只是那怎強大的工具,怎麼老是東少一點點,西少一點點,用起來有時總是感到莫名奇妙,我用VS寫jQuery都比CSS來的好用。
    2009年4月29日 上午 01:34
  • 樣式的LIST, 這個透過「Alt」 + 「->」就可以顯示出來了.

    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    • 已編輯 Lolota Lee 2009年4月29日 上午 02:04 補圖
    2009年4月29日 上午 02:00
  • 這我知道,這是最下下策的方法,
    只是目前使用的IntelliSense,就VS中CSS的最「 」。

    我個人就這個問題是比較偏向它是個「bug」。

    還是感謝Lolota Lee
    2009年4月29日 上午 02:29
  • Hi,

    剛才我測試了一下, 可以透過下列方法達到您的需求,

    #id
    {
       (按下Enter後, 就會跳出來IntelliSense)
    }


    我想這樣應該要稍微改變您的操作方式.

    B.R.
    Lolota
    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    2009年4月29日 上午 02:53
  • 測試結果應該是這樣:

    #id{
      (在空白行按下space,就會跳出來IntelliSense) but 打完後按 Enter
       程式會在第二行會自動對齊,但你還是一樣(在空白行按下space,就會跳出來IntelliSense)
    }

    從第二行之後,應該是按完Enter後要自動帶IntelliSense,但還是要多一個space動作,所以如果我使用IntelliSense打完一整段CSS,
    #sidebar {
      background:       #efe5d0 url(images/background.gif) bottom right;
       font-size:        105%;
        padding:          15px;
         margin:           0px 10px 10px 10px;
          position:         absolute;
           top:              128px;
            right:            0px;
             width:            280px;
    }


    很美吧,階梯式的哦,這算MS式的美感嗎?

    還是很感謝Lolota Lee,這比手打「Alt」 + 「->」 已經好太多了。
    2009年4月29日 上午 06:44
  • 您可以再看仔細一下.. ^^:


    #id
    /*  這是獨立的一行, 輸入完"{"後, 在按下Enter  */ 
      background:#efe5d0 url(images/background.gif) bottom right;  /*按下Enter跳下一行*/
      font-size:105%;
    }


    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    2009年4月29日 上午 06:56
  • 這就怪了,我們倆的VS版本不一樣嗎?
    我怎麼試就只能用space帶IntelliSense出來,怪怪怪???

    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    版本 3.5 SP1
    
    安裝的版本: Professional
    
    Microsoft Visual Basic 2008   91985-270-1740261-60003
    Microsoft Visual Basic 2008
    
    Microsoft Visual C# 2008   91985-270-1740261-60003
    Microsoft Visual C# 2008
    
    Microsoft Visual C++ 2008   91985-270-1740261-60003
    Microsoft Visual C++ 2008
    
    Microsoft Visual Studio 2008 Tools for Office   91985-270-1740261-60003
    Microsoft Visual Studio 2008 Tools for Office
    
    Microsoft Visual Web Developer 2008   91985-270-1740261-60003
    Microsoft Visual Web Developer 2008
    
    Crystal Reports    AAJ60-M0MSA4K-680007Z
    Crystal Reports Basic for Visual Studio 2008
    
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 Service Pack 1 (KB945140)   KB945140
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Service Pack。
    如果日後您安裝更新版本的 Service Pack,這個 Service Pack 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/945140。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 Service Pack 1 (KB947888)   KB947888
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Service Pack。
    如果日後您安裝更新版本的 Service Pack,這個 Service Pack 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/947888。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 Service Pack 1 (KB948484)   KB948484
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Service Pack。
    如果日後您安裝更新版本的 Service Pack,這個 Service Pack 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/948484。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB944899)   KB944899
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/944899。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB945282)   KB945282
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/945282。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB946040)   KB946040
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/946040。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB946308)   KB946308
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/946308。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB946344)   KB946344
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/946344。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB946581)   KB946581
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/946581。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB947171)   KB947171
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/947171。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB947173)   KB947173
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/947173。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB947180)   KB947180
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/947180。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB947540)   KB947540
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/947540。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB947789)   KB947789
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/947789。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB948127)   KB948127
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/948127。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB953256)   KB953256
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/953256。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix (KB958502)   KB958502
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的 Hotfix。
    如果日後您安裝更新版本的 Service Pack,這個 Hotfix 就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/958502。
    
    Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的更新 (KB956453)   KB956453
    這是 Microsoft Visual Studio 2008 Professional 版 - 繁體中文 的更新。
    如果日後您安裝更新版本的 Service Pack,這個更新就會自動解除安裝。
    如需詳細資訊,請造訪 http://support.microsoft.com/kb/956453。

    Lolota Lee你幫我看看!
    http://kkbruce.blogspot.com/
    2009年4月29日 上午 07:06
  • 我也是一樣SP版本, 不過是Enterprise edition.
    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Enterprise


    您可以Check一下CSS的設定 :
















    微軟技術支援中心(CSS) - http://twitter.com/msdn_taiwan
    • 已標示為解答 KKBruceMVP 2009年4月29日 上午 07:47
    2009年4月29日 上午 07:19
  • 功能正常了,回答如下:

    我的VS Pro灌好到現在沒有修改過設定值,應該是Enterprise與Professional的預設值不同,所造成。

    Professional差異如下:

    圖一:
    一般
    自動換行(未勾選 --> 修改「勾選」)
    顯示自動換行的視覺化圖像(S)(未勾選 --> 修改「勾選」)

    圖二:
    定位點
    縮排
    區塊(B) --> 修改「知慧型(S)」

    定位點
    插入空格(P) --> 修改「保留定位點」(K)

    圖四:
    格式:你設定什麼格式,就必須使用那種格式來輸入,且必須先輸入{,然後在{按Enter輸入…,輸入完後,才按},不能先按{},再回來輸入,不然就是
    1.要回到{後面再按一次Enter,
    2.到空白行按space,
    才會出現IntelliSense。

    非常感謝Lolota Lee。
    http://kkbruce.blogspot.com/
    • 已標示為解答 KKBruceMVP 2009年4月29日 上午 07:47
    2009年4月29日 上午 07:46