gpt4 book ai didi

javascript - 一个 Angular CSS 绘图

转载 作者:太空宇宙 更新时间:2023-11-04 05:20:55 25 4
gpt4 key购买 nike

我的 CSS 如下所示:

.block1 {

height:20px;
width:70px;
background-color:#09F;
background-repeat:no-repeat;
position:absolute;

}

这会绘制一个矩形。接下来我想在一个 Angular 上绘制一个矩形,例如 45 度 Angular 。我不知道 Angular 选项,我该怎么做?

最佳答案

并非所有浏览器都完全支持它,但您可以使用 CSS 旋转。 Here's an article on it .

基本上,应用:

-moz-transform:rotate(45deg); /* Firefox */
-webkit-transform:rotate(45deg); /* WebKit (Chrome, Safari) */
-o-transform: rotate(45deg); /* Opera */
-ms-transform:rotate(45deg); /* IE9 */
transform: rotate(45deg); /* No support currently, but hooray future! */

/* Fun IE code (you should probably put this in a separate css file controlled with conditional comments) */
/* IE8+ - must be on one line, unfortunately */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')";
/* IE6 and 7 */
filter: progid:DXImageTransform.Microsoft.Matrix(
M11=0.7071067811865474,
M12=-0.7071067811865477,
M21=0.7071067811865477,
M22=0.7071067811865474,
SizingMethod='auto expand');
/* These are necessary for the IE code only */
margin-left: 5px;
margin-top: -70px;

this tool 生成的 IE 代码,这非常有用。

关于javascript - 一个 Angular CSS 绘图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6588398/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com