Home > Blockchain >  How to load an background image in the assets folder in scss, using angular
How to load an background image in the assets folder in scss, using angular

Time:11-16

I'm trying to do this on angular, on styles.scss

.main-content {
    height: 80vh;
    padding: 30px;
    background-image: '/assets/adult-g3180e6c1c_1920.jpg';
}

But Google Inspector says this: Google Inspector comment

Help please!!!

CodePudding user response:

Try

.main-content {
  height: 80vh;
  padding: 30px;
  background-image: url('assets/adult-g3180e6c1c_1920.jpg'); 
 }
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

  • Related