CSS Help - div over image

后端 未结 3 468
遥遥无期
遥遥无期 2020-12-22 08:54

I\'m making a small site for my college project, most of it is complete but I\'m stuck on how I should go about adding a feature.

If you go onto a site like http://w

3条回答
  •  孤城傲影
    2020-12-22 09:32

    How about having a master

    with a background image?

    [content]

    And style them with CSS, or use JavaScript to set the images.

    .image {
        width: 200px;
        height: 150px;
        position: relative;
    }
    .footerBar {
        background-color: lightGrey;
        position: absolute;
        bottom: 0px;
        width: 100%;
        overflow: none;
        display: none;
    }
    .image:hover .footerBar {
        display: block;
    }
    

    See example on jsFiddle

提交回复
热议问题