image loaded with background-image doesn't show up

后端 未结 2 1574
失恋的感觉
失恋的感觉 2021-01-27 21:25

I\'m really confused, I\'m trying to create a landing page with an icon and some buttons, but I can\'t manage to make the background image I\'m using show up, even if it\'s load

相关标签:
2条回答
  • 2021-01-27 21:50

    Since I don't have reputation enough to comment, I'll post it here.

    Jsfiddle

    .row {
      height: <define height here>;
    }
    
    height: 100%;
    

    The height: 100% will make it the same height of it's parent element, which is 'row'.

    Cheers

    0 讨论(0)
  • 2021-01-27 22:04

    The tryhard div lacks dimensions (width, height). Set some values for height and width or add some content (currently it is an empty div without padding, so it is 0 x 0) and you will see your background image

    0 讨论(0)
提交回复
热议问题