Created
September 1, 2019 02:37
-
-
Save mdecourse/ef311161ee04fb7b278c01dc591cd392 to your computer and use it in GitHub Desktop.
Dartpad and Html
This file contains 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
<p id="text1"> | |
origin text | |
</p> |
This file contains 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
// https://dart.dev/tutorials/web/low-level-html/connect-dart-html | |
import 'dart:html'; | |
void main() { | |
// 選擇將 id 為 text1 的 text 文字設為 "changed" | |
querySelector("#text1").text = "changed"; | |
} |
This file contains 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
/* | |
設定 id 為 text1 標註的 style | |
*/ | |
#text1 { | |
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