我這個為什么沒有效果?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>練習4</title>
? ? <style type="text/css">
? ? ? ? ? .a1{
? ? ? ? ? width: 300px;
? ? ? ? ? height: 200px;
? ? ? ? ? background-image: radial-gradient(circle center,red,blue);
? ? ? ? ? margin-bottom: 20px;
? ? ? ? ? }
? ? ? ? ? .a2{
? ? ? ? ? width: 300px;
? ? ? ? ? height: 200px;
? ? ? ? ? background-image: radial-gradient(ellipsis center,red,green,yellow);
? ? ? ? ? }
? ? </style>?
</head>
<body>
<div class="a1">1</div>
<div class="a2">2</div>
</body>
</html>
2021-03-26
它可以是值 circle 或 ellipse。其中,circle 表示圓形,ellipse 表示橢圓形。默認值是 ellipse
第一個去掉center就可以了,第二個由于是默認值,所以把ellipse? center去掉就好了
2021-03-25
第二個錯誤看到了,但是第一個我看不出來
2021-03-25