Using :before CSS pseudo element to add image to modal

后端 未结 4 1649
不思量自难忘°
不思量自难忘° 2020-12-12 23:11

I have a CSS class Modal which is absolutely positioned, z-indexed above it\'s parent, and nicely positioned with JQuery. I want to add a caret image (^) to th

4条回答
  •  萌比男神i
    2020-12-12 23:51

    1.this is my answer for your problem.

    .ModalCarrot::before {
    content:'';
    background: url('blackCarrot.png'); /*url of image*/
    height: 16px; /*height of image*/
    width: 33px;  /*width of image*/
    position: absolute;
    }
    

提交回复
热议问题