禁止使用某个CSS属性的方法介绍
禁止使用某个CS属性的方法,可以让用户更容易地修改用户的CS属性。
1.使用style属性
使用style属性可以设置CS属性的值,例如:
.container{
width:20px;
height:10px;
background-color:red;
}
background-color:yelow;
/*设置元素背景颜色*/
background-color:yelow;
/*设置元素背景图片*/
background-image:url('bg.jpg');
background-size:cover;
/*设置元素背景模糊*/
background-repeat:no-repeat;
/*设置元素背景渐变*/
background-image:url('bg.jpg');
background-size:cover;
/*设置元素背景渐变*/
background-image:url('bg.jpg');
background-size:cover;
/*设置元素背景模糊*/
background-position:left;
/*设置元素背景模糊*/
background-repeat:no-repeat;
/*设置元素背景模糊*/
background-size:yelow;
/*设置元素背景模糊*/
background-repeat:no-repeat;
/*设置元素背景模糊*/
backdrop:fixed;
我们是高品质web前端培训机构,我们拥有大量实力web前端培训讲师,提供优质的web培训课程,web前端培训,欢迎报名我们。