3
I created a box by css and created a "triangle" using ::after to give that effect of the top bigger than the bottom, just to improve the same aesthetics..
I simplified the code to study character:
#btn{
font-size: 16px;
color: white;
background-color: black;
padding: 6px 12px;
width: 150px;
height: 36px;
}
#btn::after{
content: '';
margin-top:-6px;
border-right: 40px solid transparent;
border-top: 36px solid #7e9ee4;
position: absolute;
left: 100%;
}
Perfect, it works 100%
Now I wanted to implement, use the box-shadow in #btn, this doing the normal shadow, as the function was made.
But when I try to put the shadow in the "triangle" the leftover will always be in the square where this false triangle was made,:
Without using a png background there is a way to make this color that in the code is like 'black' jugar a leftover to the 'Transparent' or this really is not possible to be done via CSS?
To illustrate, follow the 3 situations:
first: no shadows
second: shadow only in #btn
third: shadow in #btn::after
Rafael. The question is good but the environment is technical, we are not social network, or forum discussions. We are a site of questions and answers. Avoid lengths, slang, personal and informal forms of treatment.
– Augusto Vasques
thanks for the tips, buddy. I will police myself to avoid these mistakes again. Hug.
– Rafael