我可以使用 DART 编辑 HTML 标记的 CSS 吗?
我已经进行了一些搜索,但我无法真正找到如何做到这一点,或者是否可能。
这样做的原因是我想更改按钮在页面上的位置。
最佳答案
您可以通过Element.style
更改或查看CSS属性。 Element.style
是 CssStyleDeclaration
的实例。您可以执行以下操作:
Element element = document.querySelector("div")
..style // edit any of the properties of this variable
..style.background = "orange";
关于html - 使用 Dart 编辑 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22280994/