문제

I am having a problem with creating a linear gradient and box shadow for a button. The problem is gradient works for cross broswers but box shadow does not(inset is not needed). Mainly i needed it for ie8.

My requirement is to write css for a single class(like .submit) with supporting linear gradient and box-shadow for all the browsers.

도움이 되었습니까?

해결책

You can apply shadow using this example.

.shadow{
     filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3,MakeShadow=true,ShadowOpacity=0.30);
     -ms-filter: "progid:DXImageTransform.Microsoft.Blur(PixelRadius=3,MakeShadow=true,ShadowOpacity=0.30)";
     zoom: 1;
}

you can make your own variations here at css3 pie

다른 팁

Take a look at shadow filter.

This would add a shadow on each side of an element:

.boxshadow {    
        zoom: 1;
        filter: progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=0, Strength=3)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=45, Strength=2)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=90, Strength=3)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=135, Strength=2)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=180, Strength=3)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=225, Strength=2)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=260, Strength=3)
        progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=305, Strength=2);
}

Should work in IE down to Version 6.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top