画像の左端にリボンを付けておしゃかわにしましょう

Cat
1 2 3 4 | <div class = "cp_card" > <img src= "/wp-content/uploads/2024/12/01.png" alt= "振り向きねこちゃん" width= "370" height= "320" class = "aligncenter size-full wp-image-142" /> <div class = "cp_ribbon02" ><div class = "cp_ribbon" >Cat</div></div> </div> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | .cp_card { max-width : 200px ; position : relative ; background : #ffffff ; overflow : visible ; padding : 5px ; box-shadow : 0 0 5px rgba ( 0 , 0 , 0 , 0.3 ); border-radius : 15px ; margin : 0 auto ; } .cp_ribbon 02 { width : 106px ; height : 108px ; overflow : hidden ; position : absolute ; top : -6px ; left : -6px ; } .cp_ribbon 02 .cp_ribbon { font-size : 1em ; line-height : 1.2em ; position : relative ; top : 26px ; left : -33px ; width : 150px ; padding : 7px 0 ; -webkit- transform : rotate ( -45 deg); transform : rotate ( -45 deg); text-align : center ; letter-spacing : 0.5px ; color : #ffffff ; background-color : #ff0000 ; box-shadow : 0 4px 6px rgba ( 0 , 0 , 0 , 0.1 ); } .cp_ribbon 02 .cp_ribbon::before,.cp_ribbon 02 .cp_ribbon::after { position : absolute ; bottom : -4px ; content : '' ; border-width : 4px 4px 0 4px ; border-style : solid ; border-color : #bd3535 transparent transparent transparent ; } .cp_ribbon 02 .cp_ribbon:before { left : 0 ; } .cp_ribbon 02 .cp_ribbon:after { right : 0 ; } |