I can't change body style attribute
I need to change the body atribute style to background-attachment: fixed (to show background image)
Delphi-Quellcode:
but it does not work!! the style cant change (dont alter body tag in source code), but if I type something like 'styleE' then the attribute 'styleE' appers in source code...
IHTMldocument2(WebBrowser1.Document).body.setAttribute('style', 'background-attachment: fixed',0);
so.. how I make to chance style of body tag? (prefer using setAttribute) Thanks! |
Re: I can't change body style attribute
I found the solution:
Delphi-Quellcode:
WebBrowser1.OleObject.Document.Body.Style.cssText:='background-attachment: fixed';
The code above works |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:29 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz