how to set shadow for round image(css)

前端 未结 10 2075
暖寄归人
暖寄归人 2020-12-31 11:52

I\'m new to shadow in css can we set shadows for round image(i mean to a circle image).

if it is possible, please give me a code for this in css. thanks in advan

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-31 12:05

    shadows are independent of shapes in css, you can use the shadow property for circle after creating circle. You can use the following code for that, it should work fine

    .circle{ 
       width:150px;height:150px;
       border: solid 1px #555;
       background-color: #eed;
       box-shadow: 10px -10px rgba(0,0,0,0.6);
       -moz-box-shadow: 10px -10px rgba(0,0,0,0.6);
       -webkit-box-shadow: 10px -10px rgba(0,0,0,0.6); 
       -o-box-shadow: 10px -10px rgba(0,0,0,0.6);
       border-radius:100px;
    } 
    

提交回复
热议问题