user7917535
user7917535

Reputation:

How to give background-image over background-color

I'm tried to give background-image over background-color, can anyone help. Here's my code,

.next {
    width: 40px;
	height: 45px;
	border-radius: 100%;
        border: 1px solid #000;
	background-image: url(http://placehold.it/10x10);
        background-color: #fff;
}
<div class="next"></div>

Upvotes: 1

Views: 100

Answers (2)

codesayan
codesayan

Reputation: 1715

Is that what you want, Try This

.next {
	width: 40px;
	height: 45px;
	border-radius: 100%;
	background: #fee8fe url(http://placehold.it/10x10) no-repeat center;
}
<div class="next"></div>

Upvotes: 3

Super User
Super User

Reputation: 9642

You can use background instead of background-image & background-color. Check updated snippet

.next {
    width: 40px;
    height: 45px;
    border-radius: 100%;
    border: 1px solid #000;
    background: #fff url(http://placehold.it/10x10) repeat;
}
<div class="next"></div>

Upvotes: 2

Related Questions