ASP.NET 2010 之CSS3.0问题

html-css028

ASP.NET 2010 之CSS3.0问题,第1张

在安装Standards Update for VS2010

SP1后,VS2010中没有CSS3.0问题,以下是我的解决方法

1、首先去官网下载 CSS 3 Intellisense Schema

网址:http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/Discussions/1

2、安装

3、Win+R 输入 regedit 打开注册表

4、找到 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{A764E895-518D-11d2-9A89-00C04F79EFC3}\Schemas\Schema

5]

5、如果没有 Schema 5 创建它,并创建 String File = css30.xml 和String Friendly Name = CSS

3.0.

6、在路径C:\Program Files\Microsoft Visual Studio

10.0\Common7\Packages\1033\schemas 中找到刚刚安装的CSS文件夹中的css30.xml, 并将它拷贝到

D:\Microsoft Visual Studio 10.0\Common7\Packages\2052\schemas\CSS

路径下(注:这个是安装VS2010的路径)

7、重启VS2010即可

参考:http://blog.csdn.net/henuhaigang/article/details/8950302

就是这些代码,如果你不满意我倒找你100分!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<FCK:meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" ></FCK:meta>

<title>超酷的旋转图片特效</title>

</head>

<body>

<style type="text/css">

body{background:black}

.point{position:absoluteheight:120px}

</style>

<script>

var r=200,dv=0.01,w=100,x=400y=100,pn=8//r半径,dv偏移量,w图片宽度,x菜单横坐标,y菜单纵坐标,pn菜单图片数量

var pi=Math.PI,d=pi/2

var pd=Math.asin(w/2/r),ed=pi*2/pn,sm//pd各个图片的反正弦

function goR(){

var o=document.getElementById('imground')

var arrimg=o.getElementsByTagName('img')

for (var n=0n<arrimg.lengthn++){

arrimg[n].onmouseout=function(){sm=setInterval('roundMove()',50)} //鼠标离开菜单后继续转动

arrimg[n].onmouseover=function(){clearInterval(sm)} //鼠标移上菜单停止转动

arrimg[n].onmousedown=function(){dv=dv*2} //鼠标单击菜单加快转到速度

}

sm=setInterval('roundMove()',50)

}

function roundMove(){

var v=document.getElementById('imground')

var arrimg=v.getElementsByTagName('img')

var o,ta,strFilter

for (var n=1n<=pnn++){

o=arrimg[n-1]

ta=Math.sin(d+ed*n)//获得当前偏移量的正弦值

strFilter=''

if (ta<0){//正弦值对应为负弧度,即图片旋转到圆的背面

o.style.left=Math.cos(d+ed*n-pd)*r+x+'px'//传入当前图片移动的横坐标

}

else{//当图片旋转到圆的正面时

o.style.left=Math.cos(d+ed*n+pd)*r+x+'px'//传入当前图片移动的横坐标

}

o.style.top=ta*10+5+y+'px'//传入当前图片移动的纵坐标

o.style.width=Math.abs(Math.cos(d+ed*n+pd)-Math.cos(d+ed*n-pd))*r+'px'

o.style.zIndex=parseInt(ta*10)

if (o.style.zIndex<0){//当图片旋转到居后的位置时翻转图片

strFilter='FlipH(enabled:true)'

}

else{ //当图片旋转到前面的位置时显示图片正面

strFilter='FlipH(enabled:false)'

}

if (ta<0){

ta=(ta+1)*80+20

}else{

ta=100

}

strFilter=strFilter+' alpha(opacity='+ta+')'//透明效果(针对IE)

o.style.opacity=ta/100//透明效果(针对非IE)

o.style.filter=strFilter//在菜单图片上加入滤镜效果

}

d+=dv//增加偏移值

}

</script>

<div id="imground">

<img class="point" src="http://img.lingd.net/attachments/date_201101/b4e13fbaaadb91ad2a2bd84a557b3107.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/b4e13fbaaadb91ad2a2bd84a557b3107.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/b4e13fbaaadb91ad2a2bd84a557b3107.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/7765bdc5a6ea433818d0202ce2495206.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/7765bdc5a6ea433818d0202ce2495206.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/7765bdc5a6ea433818d0202ce2495206.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/d38de56b36b1fb93440721cfb4aa168f.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/d38de56b36b1fb93440721cfb4aa168f.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/d38de56b36b1fb93440721cfb4aa168f.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/5beaaaf71d00a8ad0a82342f9bfa7d3e.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/5beaaaf71d00a8ad0a82342f9bfa7d3e.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/5beaaaf71d00a8ad0a82342f9bfa7d3e.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/7b4304989da7dfedcd283502092cb95d.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/7b4304989da7dfedcd283502092cb95d.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/7b4304989da7dfedcd283502092cb95d.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/4d1db95608af079e0e3d2459576b47ab.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/4d1db95608af079e0e3d2459576b47ab.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/4d1db95608af079e0e3d2459576b47ab.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/5954f1caf672596f42905db58dfe6b77.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/5954f1caf672596f42905db58dfe6b77.jpg" _fcksavedurl="http://img.lingd.net/attachments/date_201101/5954f1caf672596f42905db58dfe6b77.jpg"/>

<img class="point" src="http://img.lingd.net/attachments/date_201101/4a8237d721188161b197fb05f6908e53.gif" _fcksavedurl="http://img.lingd.net/attachments/date_201101/4a8237d721188161b197fb05f6908e53.gif" _fcksavedurl="http://img.lingd.net/attachments/date_201101/4a8237d721188161b197fb05f6908e53.gif"/>

</div>

<script language="javascript">goR()</script>

</body>

</html>

VS2010:

在安装Standards Update for VS2010 SP1后,VS2010中没有CSS3.0问题,以下是我的解决方法

1、首先去官网下载 CSS 3 Intellisense Schema

网址:http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/Discussions/1

2、安装

3、Win+R 输入 regedit 打开注册表

4、找到 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{A764E895-518D-11d2-9A89-00C04F79EFC3}\Schemas\Schema 5]

5、如果没有 Schema 5 创建它,并创建 String File = css30.xml 和String Friendly Name = CSS 3.0.

6、在路径C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\1033\schemas 中找到刚刚安装的CSS文件夹中的css30.xml, 并将它拷贝到

D:\Microsoft Visual Studio 10.0\Common7\Packages\2052\schemas\CSS 路径下(注:这个是安装VS2010的路径)

7、重启VS2010即可

VS2012直接已经支持了