css中的背景图怎么改变大小
css中的背景图怎么改变大小
日期:2019-07-11 16:58:32 人气:1
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html。
2、在index.html中的标签中,输入css代码:body{background: url(image.jpg) no-repeat;background-size: 200px 200px; }。
3、浏览器运行index.html页面,此时背景图片成功被设定为200*200。