简体   繁体   中英

CSS Invalid Property Value-Background-image

I'm currently learning some CSS and have run into an error when it comes to my background image. I put in the CSS and when I go to inspect it, Developer tools tells me that it is an "invalid CSS property value". I've checked to be sure my image path is correct and have looked to see if background-image as a property has changed. Any tips would be appreciated. Thanks.

 body, html { width: 100%; height: 100%; font-family: 'Permanent Marker', cursive; background-image: url ("header2.jpeg") no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }.btn { background-color: orangered; }

Snippet from developer tools:

开发者工具图片

You can't list the values without the property names... Something like this:

background-image: url('path');
background-repeat: no-repeat, repeat;
background-attachment: fixed;
background-position: center;

Inline CSS Background has some rule- background: bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit; You have to follow this rule.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM