Given a div with the following background image: Create the following reflection effect: There are many methods, but of course we have to find the fastest and most convenient method, at least no matter how the picture changes or how the Method 1: -webkit-box-reflect This is a very new CSS property that is very simple to use and can reflect our content in all directions. However, the compatibility is too bleak: Basically, only browsers with the -webkit- kernel support it. But it is really convenient to use. The solution is as follows: But it is really convenient to use. The solution is as follows: div{ -webkit-box-reflect: below; } Method 2: inherit, use inheritance This question is mainly to introduce this method, which has good compatibility. What is Flexible use of div:before { content: ""; position: absolute; top: 100%; left: 0; right: 0; bottom: -100%; background-image: inherit; transform: rotateX(180deg); } Summarize This is the end of this article about the method of inheriting CSS properties. For more relevant CSS inheritance content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! |
<<: Docker container explains in detail how to simplify the image and reduce the size
>>: About converting textarea text to html, that is, carriage return and line break
Structured Table (IExplore Only) 1) Group by rows ...
Official website address: https://dev.mysql.com/d...
Table of contents 1. The default focus is on the ...
FastDFS & Nginx Integration: The tracker is c...
Modify /etc/my.cnf or /etc/mysql/my.cnf file [cli...
React Native is a cross-platform mobile applicati...
First create a specific project directory for you...
XMeter API provides a one-stop online interface t...
<body> <div id="root"> <...
Secondly, the ranking of keywords is also related ...
This article mainly introduces the effect of div ...
Preface Learn to create a file system on your sys...
The previous article on Docker mentioned the cons...
Table of contents 1. Data Manipulation Language (...
Table of contents 【Effect】 【Implementation method...