简体   繁体   中英

What is “q” and “+” in the CSS style of the html body tag?

This is one of the top solutions for CSSBattle question #2. But I don't understand the "+" sign and "q" in this one line code.

<body bgcolor=62375 style=margin:0+50;border:dashed+53q#fdc57b;clip-path:inset(53q+0>

According to the research "q" means quotation mark and "+" is CSS adjacent selector, which doesn't make sense in this line of code,

It's a CSS 'q' length, as an absolute length unit. 1q is equivalent to 1/40th of 1cm.

EDIT

Firstly, the inline style tag works without quotes because it is considered optional.

border:dashed + 53q #fdc57b; : We're having a dashed border, a + 53q and a color at the end. The `+ 53q' is a CSS selector.

The '+' sign in CSS is an adjacent sibling combinator. It combines two sequences of simple selectors having the same parent and the second one must come immediately after the first.

If you would view this yourself in a browser, you would notice that if you changed the value of 53 the dashed border would be changed in size. Or if you would remove it, the dashed border will have these small lines instead.

However i don't know why there is no closing brackets in the clip-path:inset(53q+0 , maybe poorly written. Either way, it works.

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