calc is a function in CSS that is used to calculate numerical values. It can calculate length, angle, time, etc. Supports The effect of the example display An example using the cacl layout I want to create an effect where the background of CSS Code #div1 { width: 100%; min-width: 400px; outline: blue; } #div2 { width: 300px; margin: 0 auto; outline: 1px solid #ccc; color: white; } HTML code <div id="div1" class="cw"> <div id="div2"> test </div> </div> Solution .cw { background:blue linear-gradient( to right, red calc(50% - 150px + 60px ) , transparent calc(50% - 150px + 60px ) ); } cacl compatibility The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: Detailed explanation of encoding issues during MySQL command line operations
>>: Parameters to make iframe transparent
First of all, we need to understand that GB2312, ...
When nginx receives a request, it will first matc...
1. First install the pagoda Installation requirem...
Over a period of time, I found that many people d...
Tables once played a very important role in web p...
What is a sticky footer layout? Our common web pa...
Table of contents 1. Preprocessing 2. Pretreatmen...
A jQuery plugin every day - stacked menu, for you...
Table of contents 1. Brief Overview 2. Detailed e...
There are three types of attribute value regular ...
CPU Load and CPU Utilization Both of these can re...
translate(-50%,-50%) attributes: Move it up and l...
IFNULL(expr1,expr2) If expr1 is not NULL, IFNULL(...
1. Top-level usage 1. Install cnpm npm i -g cnpm ...
Preface Fix the footer area at the bottom. No mat...