Jump to content
php.lv forumi

CSS backgrund image ar linku uz kaut kurieni.


Go to solution Solved by yozhis,

Recommended Posts

Netieku galā ar vienu lietu.

Gribu panākt lai ir www lapele ar vienu lielu dinamisku, pa visu ekrānu ar dažādām izšķirtspējām redzamu attēlu un lai viss browsera ekrāns būtu links piemēram uz www.delfi.lv

 

Mans kods:

 

<!DOCTYPE html>
<html><head>
<title></title>
<style>
html {
  background: url(bg.jpg) no-repeat center fixed;
  background-size: cover;
}
</style>
</head>
<body>
</body>
</html>

 

 

Saprotu ka tikai ar CSS to panākt nevarēšu. jāliek links. Bet kā to izdarīt saglabājot dinamisku attēlu un lai neparādās liekas spraugas augšā un apakšā?

Link to post
Share on other sites

Paldies! Viss sanāca. Finālā drusku savādāk:

 

viens index.html fails:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
  <title>web</title>
<style>
a{
  background: url(bg.jpg) no-repeat center fixed;
  background-size: cover;
  position:absolute;top:0;left:0;right:0;bottom:0;
}
</style>
</head><body>
<a href="https://www.facebook.com"></a>
</body></html>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...