문제

Here I created the image with round shape. But it covers all corners. I want affect only in left corners.

CODEPEN: CODEPEN DEMO

.circular {

    border-radius: 5px;
    -webkit-border-radius: 150px;
    -moz-border-radius: 150px;
    background: url(http://link-to-your/image.jpg) no-repeat;
    }

I appreciate if some one can improve this to display it similar to image in the CODEPEN. circular class is in bottom of css section

also needs help in positioning two labels

도움이 되었습니까?

해결책

You can make specific corners round by using border-top-left-radius, border-top-right-radius, border-bottom-left-radius and border-bottom-right-radius.

다른 팁

CSS

.circular {


   border:5px solid;
   border-top-left-radius:150px;
   background: url(http://link-to-your/image.jpg) no-repeat;
}

You can shorthand your css to a one-liner as well. Just remember, the border order in shorthand goes:

top left, top right, bottom right, bottom left

So if you want to control a specific border, do this:

.circular { 
    border-radius: 150px 0 0 150px; 
    background: url("image path") no-repeat; 
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top