0

Window background image

asked 2015-05-19 14:59:21 +0800

greendragon gravatar image greendragon
25 4

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

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2015-05-20 01:38:42 +0800

echarish gravatar image echarish flag of Japan
1809 7
http://jp.linkedin.com/in...

updated 2015-05-20 03:22:16 +0800

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

link publish delete flag offensive edit
0

answered 2015-05-19 22:53:20 +0800

Darksu gravatar image Darksu
1991 1 4

updated 2015-05-19 22:54:04 +0800

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

link publish delete flag offensive edit
0

answered 2015-05-21 15:36:45 +0800

greendragon gravatar image greendragon
25 4

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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-05-19 14:59:21 +0800

Seen: 40 times

Last updated: May 21 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More