Toggle navigation
☰
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <style> /* The original element we want to mirror */ #source-box { width: 200px; padding: 20px; background: linear-gradient(135deg, #ff7e5f, #feb47b); color: white; font-family: sans-serif; font-weight: bold; text-align: center; border-radius: 10px; margin-bottom: 20px; } /* The element where we apply the background image */ .reflection-box { width: 200px; height: 100px; border: 2px dashed #ccc; /* Firefox prefix */ background-image: -moz-element(#source-box); /* Standard syntax */ background-image: element(#source-box); /* Optional: adjust how the mirrored image fits */ background-size: contain; background-repeat: no-repeat; } .warning-msg { font-family: sans-serif; font-size: 0.9em; color: #d9534f; margin-top: 10px; } </style> <!-- The Source Element --> <div id="source-box"> I am the original HTML element! </div> <!-- The Target Element --> <div class="reflection-box"></div> <div class="warning-msg"> <em>Note: The dashed box above will only display a reflection of the orange box if your browser supports the element() function (currently mainly Firefox).</em> </div>