天气 动图 接入
This commit is contained in:
25
src/components/Weather/WeatherSunny.jsx
Normal file
25
src/components/Weather/WeatherSunny.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import "./WeatherSunny.css";
|
||||
|
||||
export default function WeatherSunny() {
|
||||
const rays = Array.from({ length: 12 }).map((_, i) => {
|
||||
const angle = i * 30; // 每根 30°
|
||||
return (
|
||||
<span
|
||||
key={i}
|
||||
className="ray"
|
||||
style={{
|
||||
transform: `rotate(${angle}deg) translateY(-120px)`
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="weather-sunny">
|
||||
<div className="sun">
|
||||
{/*{rays}*/}
|
||||
<div className="core"></div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user