Last active
June 3, 2018 12:13
-
-
Save iapolog2u/196fa9e91307db8baa3aef92e80f0d7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>A Minimalist App</title> | |
| <script defer src="main.dart.js"></script> | |
| </head> | |
| <body> | |
| <p id="RipVanWinkle"> | |
| RipVanWinkle paragraph. | |
| </p> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 要在DartPad之外运行您的应用程序,您需要将您的Dart代码编译为JavaScript。使用webdev build命令 将您的应用程序编译为可部署的JavaScript。 | |
| import 'dart:html'; | |
| void main() { | |
| // 在Dart中,您可以简单地使用Element text属性,该属性具有一个getter,可以为您节点的子树,并提取它们的文本。 | |
| querySelector('#RipVanWinkle').text = 'Wake up, sleepy head!'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #RipVanWinkle { | |
| font-size: 20px; | |
| font-family: 'Open Sans', sans-serif; | |
| text-align: center; | |
| margin-top: 20px; | |
| background-color: SlateBlue; | |
| color: Yellow; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment