Created
May 18, 2013 04:14
-
-
Save kevinbubu/5603208 to your computer and use it in GitHub Desktop.
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
var win = Ti.UI.createWindow({ | |
backgroundColor:'#fff' | |
}); | |
var web = Ti.UI.createWebView({ | |
html:'<html>' + | |
' <head>' + | |
' <style type="text/css">' + | |
' body {background-color: yellow}' + | |
' h1 {background-color: #00ff00}' + | |
' h2 {background-color: transparent}' + | |
' p {background-color: rgb(250,0,255)}' + | |
' p.no2 {background-color: gray; padding: 20px;}' + | |
' </style>' + | |
' </head>' + | |
' <body>' + | |
' <h1>這是標題 1</h1>' + | |
' <h2>這是標題 2</h2>' + | |
' <p>這是段落</p>' + | |
' <p class="no2">這個段落設置了內邊距。</p>' + | |
' </body>' + | |
'</html>' | |
}); | |
win.add(web); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment