document.querySelector(".el-upload").style.setProperty("border", "1px dashed transparent");
这里也可以使用id精确设置属性值,删除属性无效,只能重设属性值,亲测有效。在需要设置的函数/方法里面添加此代码即可。
web动态修改样式值、修改style标签里面的css样式、document、querySelector、setProperty
猜你喜欢
转载自blog.csdn.net/weixin_51157081/article/details/125302871
今日推荐
周排行