CSS Winkel Cut -Umrissknopf [Duplikat]CSS

CSS verstehen
Anonymous
 CSS Winkel Cut -Umrissknopf [Duplikat]

Post by Anonymous »

Ich muss diese speziell geformte Taste erstellen. orange. < /p>
Ich habe eine nützliche Ressource aus CSS-Tricks gefunden. Ich brauche Winkeln nur im rechten und unten linken Pause zwei sollten gerade sein. Zusammen mit orangefarbenem Hover -Effekt, wie bereits erwähnt. Hier ist der Code, den ich ab sofort < /p>


habe ">

Code: Select all

*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: poppins, sans-serif;
padding: 20px;
background-color: #5240f3;
}

.box {
--b: 4px; /* border */
--s: 20px; /* size of the cut */

width: 300px;
display: inline-block;
aspect-ratio: 1.5;
position: relative;
z-index: 0;
}
.box:before {
content: "";
position: absolute;
inset: 0;
z-index: -1;
background: linear-gradient(45deg, white, white);
--g1: #000 var(--b), #0000 0 calc(100% - var(--b)), #000 0;
--g2: #0000 calc(0.707 * var(--s)), #000 0 calc(0.707 * var(--s) + var(--b)),
#0000 0 calc(100% - 0.707 * var(--s) - var(--b)),
#000 0 calc(100% - 0.707 * var(--s)), #0000 0;
-webkit-mask: linear-gradient(45deg, var(--g2)),
linear-gradient(-45deg, var(--g2)),
linear-gradient(90deg, var(--g1)) 50%/100% calc(100% - 2 * var(--s))
no-repeat,
linear-gradient(180deg, var(--g1)) 50% / calc(100% - 2 * var(--s)) 100%
no-repeat;
}< /code>









CSS Masking





Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post
  • CSS Winkel Cut -Umrissknopf [Duplikat]
    by Anonymous » » in HTML
    0 Replies
    0 Views
    Last post by Anonymous
  • So verwenden Sie @for mit NgClass in Winkel 18
    by Guest » » in HTML
    0 Replies
    26 Views
    Last post by Guest
  • So verwenden Sie @for mit NgClass in Winkel 18
    by Guest » » in CSS
    0 Replies
    24 Views
    Last post by Guest
  • Wie verwende ich Daten einer Komponente in einer anderen Komponente in Winkel 6?
    by Guest » » in HTML
    0 Replies
    25 Views
    Last post by Guest
  • SceneKit fügt 2 Euler-Winkel zusammen
    by Guest » » in IOS
    0 Replies
    23 Views
    Last post by Guest