Search
 
SCRIPT & CODE EXAMPLE
 

CSS

div background image

#avatar {
    /* This image is 687 wide by 1024 tall, similar to your aspect ratio */
    background-image: url('http://i.stack.imgur.com/Dj7eP.jpg');
    
    /* make a square container */
    width: 150px;
    height: 150px;

    /* fill the container, preserving aspect ratio, and cropping to fit */
    background-size: cover;

    /* center the image vertically and horizontally */
    background-position: top center;

    /* round the edges to a circle with border radius 1/2 container size */
    border-radius: 50%;
}
Comment

div background image

div {
   /* Background pattern from Toptal Subtle Patterns */
   background-image: url("https://amymhaddad.s3.amazonaws.com/morocco-blue.png");
   height: 400px;
   width: 100%;
}
Comment

make image background of div

background-image: url("photographer.jpg");
Comment

PREVIOUS NEXT
Code Example
Css :: z index div over cursor 
Css :: mat dialog background color 
Css :: generate random grid in css 
Css :: expo vector icons install 
Css :: css font properties 
Css :: how to give text stroke in css 
Css :: background properties css 
Css :: how to put a black overlay on a photo css 
Css :: remove scrollbar from select tag 
Css :: Media Query smartphone only 
Css :: text gradient effect 
Css :: griddy css 
Css :: input padding without changing width 
Css :: underline text using css 
Css :: cool hover effects css 
Css :: decrease div size 
Css :: fade in transition css 
Css :: css how to change font colr 
Css :: how to add hover effect in emotion 
Css :: css gradient bottom page 
Css :: image responsive css 
Css :: uninstall tinyproxy ubuntu 
Css :: how to align border to center in css 
Css :: change mouse pointer on image hover 
Css :: media queries 
Css :: css outline offset 
Css :: backgorund color transitition css 
Css :: @fontface otf 
Css :: cypress check css property value 
Css :: css word break 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =