import React from "react";
import ReactDOM from "react-dom";
const customStyle = {
color : "red"
}
const dStyle = {
backgroundImage : "https://wallpapercave.com/wp/wp2771916.jpg", // unable to view this image as background-image
}
ReactDOM.render(
<div style = {dStyle}>
<h1 style = {customStyle}>Hello World!
</h1>
</div>, document.getElementById("root"));
我尝试通过永恒的样式来完成上述操作,但它发生了,但通过内联 css 我无法获取图像。
大话西游666
慕容708150
BIG阳
相关分类