A Pen by dinesh

Thumbnail
This awesome code was written by dineshrillmark, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright dineshrillmark ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  dinesh</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="extra"></div>
<br />
<div id="wrapper">
  <div id="sticky">
    sticky
  </div>
</div>
<br />
<div class="extra"></div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/dineshrillmark/a-pen-by-dinesh-NgQZPd */

#sticky {
  position: sticky;
  background: #F762BC;
  width: 100px;
  height: 100px;
  top: 70px;
  left: 10px;
  display: block;
  box-shadow: 0 0 6px #000;
  text-shadow: 0 0 4px #fff
}

#wrapper {
  width: 75%;
  margin: auto;
  height: 400px;
  background-color: #ccc;
}

.extra{
  background: #ccc;
  width: 75%;
  margin: auto;
  height: 100px;
}

body {
  height: 1000px;
}

Comments