"Clip Path Transitions"
Bootstrap 4.1.1 Snippet by koshikojha

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<link rel="stylesheet" herf="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
<div class="wrapper">
<div class="card">
<span><i class="fas fa-info"></i></span>
<h1>Hi</h1>
<p>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Voluptas, libero explicabo similique eius minus at nam ipsa assumenda aliquid necessitatibus!
</p>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
body{
padding: 0px;
margin: 0px;
height:100vh;
font-family: 'Lato';
background-color: #dadada;
}
.wrapper{
position: relative;
top:50%;
left:50%;
width: 20em;
transform: translate(-50%,-50%);
display: block;
color: #fff;
}
.card{
padding: 1em;
background-color: #f0645e;
width:300px;
clip-path: circle(8% at 93% 16%);
transition: all .5s ease-in-out;
cursor: pointer;
}
.card:hover{
clip-path: circle(75%);
background-color: #00979c;
}
.card span{
float: right;
transition: all .5s;
position: relative;
margin-right: 3px;
}
.card h1{
margin: 0px;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: