A seguito di questa question, ho creato un JSFiddle, ma l'uscita non sembra così buono:Il CSS mi ha spezzato il cuore?
Ecco la CSS, preso dalla risposta c'è:
#heart {
position: relative;
width: 100px;
height: 90px;
margin-top: 10px;
/* leave some space above */
}
#heart:before {
position: absolute;
content: "";
left: 50px;
top: 0;
width: 52px;
height: 80px;
background: red;
/* assign a nice red color */
border-radius: 50px 50px 0 0;
/* make the top edge round */
}
#heart:before {
-webkit-transform: rotate(-45deg);
/* 45 degrees rotation counter clockwise */
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
/* Rotate it around the bottom-left corner */
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
#heart:after {
left: 0;
/* placing the right part properly */
-webkit-transform: rotate(45deg);
/* rotating 45 degrees clockwise */
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
/* rotation is around bottom-right corner this time */
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
Did I perdere qualcosa, o quell'amore è invecchiato (ha circa 2 anni)?
il CSS nel vostro violino è drastica diverso dal CSS nella domanda che colleghi. Se copi il CSS dalla domanda nel tuo violino, questo diventa perfetto. – meagar
@meagar I * penso * Ho corretto il codice. Tuttavia, qualcuno ha chiarito i commenti e sembra che contenga una soluzione utile, verificherà in seguito! – gsamaras
1 per il titolo appariscente. -2 dato che sembra proprio che si tratti di un rappresentante. – Jonathan