-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm new about ZK development. I just want to create a simple login page with a background image. Maybe my question is stupid but I can't insert the background image. I tried various solutions without solve the problem.
<zk>
<style>
body {
background-image:url('/image/background/bground_home.png');
background-repeat: no-repeat}
</style>
<window id="loginWin"
...
<grid>
.... login fields ...
</grid>
</window>
</zk>
I've no idea how proceed...
Thanks
Hello greendragon,
You could create a div and apply the following style with better results:
<div style="
background: url(img/image.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;"
</div>
Best Regards,
Darksu
Hello
if you just want a image as background to your window use
contentStyle=" background-image:url('/image/background/bground_home.png')"
<window border="normal" contentStyle=" background-image:url('/image/background/bground_home.png')" width="800px" height="800px">
in your window tag.
I have created a fiddle for you to see it implimented
http://zkfiddle.org/sample/1pkkpqn/2-Window-with-background-image
Hope it helps
Harish
Thanks for replies. I used Darksu solution, because using contentStyle in window it's only possible to set the beackground for the login window, not for the whole page. Is this the better solutions? Thanks
Asked: 2015-05-19 14:59:21 +0800
Seen: 51 times
Last updated: May 21 '15