3
<!doctype html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Button</title>
<style>
.slanted {
width: 200px;
height: 50px;
border: 2px solid #9b9999;
background: linear-gradient(to right, #ff00dd, #e03e3e);
outline: none;
color: #e4e1e1;
font-size: 20px;
font-weight: bold;
cursor: pointer;
margin: 5px 5px 5px 15px;
transform: skew(-40deg);
}
</style>
</head>
<body>
<button class="slanted button1" type="button">Login</button>
</body>
</html>
I’m creating a button for a site I’m developing, but the problem is that when I put the negative 40-degree button on the x-axis transform: skew(-40deg)
, the text inside the button is tilted also I tried several shapes so text does not tilt together, but it did not help! who can help I am very grateful.
It didn’t work! had already tried this method!
– user162649
The problem has to do with
display:inline
of<span>
. Change forblock
already works.– Isac
That even worked, thanks friend! I suggest you put an answer so I mark as solved.
– user162649