Answers for "fading picture css"

CSS
1

css image fade edges

<div class="image"></div>
<style>
  .image {
     background-image: url('your-image-url-here');
     /*set height and width of your image*/
     width: 300px;
     height: 300px;
     box-shadow: 0 0 8px 8px white inset; /*match the box-shadow color with the bg color*/
  }
</style>
Posted by: Guest on January-07-2022
0

fading bottom image css

.image { position: relative; }
.image img { display: block; position: relative; z-index: 1; width: 100%; }
.image .fade { position: absolute; bottom: 0; width: 100%; height: 150px; z-index: 2; background: rgba(255, 255, 255, 0) linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 80%) repeat scroll 0 0;  }
Posted by: Guest on October-14-2020

Browse Popular Code Answers by Language