Reputation: 744
I have created a spinner with a pause icon inside. It's working ok at the moment, but the pause icon seems to be spinning along with the rest of the spinner. I don't want it to spin. But I want the spinner with the orange circle to keep spinning. How do I that?
Here is my code on plnkr
<span class="spinner fa-spin">
<i class="fa fa-pause fa-inverse fa-lg"> </i>
</span>
<style>
.spinner {
height: 40px;
width: 40px;
position: absolute;
top: 50%;
left: 50%;
margin: -20px -20px 0 0;
border: 3px solid #F2B049;
border-top: 3px solid #E6FFFC;
border-left: 3px solid #E6FFFC;
background-color: #1FBBA6;
border-radius: 100%;
text-align: center;
line-height: 40px;
}
</style>
Upvotes: 1
Views: 164
Reputation: 744
Solved. Here's the plunkr and relevant code. If you have suggestions on how to improve this, please let me know. :D
Correct:
<Br/>
<div class="spinner-wrapper relative">
<span class="spinner fa-spin inline-block" ></span>
<div class="put-on-top">
<i class="fa fa-pause fa-inverse fa-lg"></i>
</div>
</div>
<style>
.relative {
position: relative;
}
.put-on-top {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
line-height: 45px;
text-align: center;
}
.spinner-wrapper {
display: inline-block;
}
.inline-block {
display: inline-block;
}
.spinner {
height: 40px;
width: 40px;
border: 3px solid #F2B049;
border-top: 3px solid #E6FFFC;
border-left: 3px solid #E6FFFC;
background-color: #1FBBA6;
border-radius: 100%;
text-align: center;
line-height: 40px;
}
Upvotes: 1