Code: Select all
html=
(
<!DOCTYPE html>
<html>
<head>
<style>
img:hover { background-color: #888888; }
img { height: 200px; width: auto; PADDING: 10px;}
</style>
</head>
<body>
<div>
<IMG id=1 src="https://www.autohotkey.com/assets/images/features-bootstrap.png">
<IMG id=2 src="https://www.autohotkey.com/assets/images/features-why.png">
</div>
</body>
</html>
)
Gui, Add, ActiveX, w400 h300 vimg, MSHTML:
img.Write(html)
img.Close()
; Modify the HTML
; Style := "img:hover { background-color: #888888;}"
; . "img{ height: 400px; width: auto; PADDING: 10px;}"
; img.GetElementsByTagName("style")[0].outerHTML := Style
Gui, Show
; MsgBox, % img.documentElement.outerHTML
Return
GuiClose:
ExitApp