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
Preface The apt-get command is a package manageme...
Table of contents 1. Introduction to pid-file 2.S...
1. Compatibility As shown below: The compatibilit...
This article shares the specific code of JavaScri...
Many times, after we install a web service applic...
Preface When we forget the MySQL database passwor...
This article shares with you how to use JavaScrip...
Background of the accident: A few days ago, due t...
1. Introduction This article will show you how to...
Table of contents 1. Process 2. Core Architecture...
During the development activity, I encountered a ...
Possible reasons: The main reason why Seata does ...
The default varchar type in MySQL is case insensi...
Table of contents MySQL query tree structure 1. A...
Table of contents MAH 1. Introduction to MAH Arch...