We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第132天 有哪些方式可以对一个DOM设置它的CSS样式?
The text was updated successfully, but these errors were encountered:
1.可以使用行内样式 2.可以使用style标签 3.可以使用link引入css文件 4.可以使用js动态修改
Sorry, something went wrong.
<div style="text-align:center;">233</div>
<head> ... <style> div{ text-align: center; } </style> ... </head> <body> ... </body>
<head> ... <link href="..." rel="..."> ... </head>
外链,内联,行内,js脚本修改
外链css样式文件中对对应节点绑定样式。 内联样式,在<style> 中写样式。 行内样式,在对应dom节点中写样式。 基于JS的innerHTML直接更改对应的样式。
let dom = document.getElementById('a'); dom.innerHTML="<div id='a' style='border:solid 1px red;width:300px;height:300px'>1</div>"
你们都说完了,我只有说666了。
No branches or pull requests
第132天 有哪些方式可以对一个DOM设置它的CSS样式?
The text was updated successfully, but these errors were encountered: