mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Base: Add test for a box placed over links with negative z-index
In this test, a set of links has a background box placed behind them via a negative z-index. The expectation is that a hit test on a link during a mouse-move event should select that link, and not the background box.
This commit is contained in:
committed by
Andreas Kling
parent
cbd62c472e
commit
2cc10c62ee
Notes:
sideshowbarker
2024-07-18 20:55:44 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/2cc10c62eed Pull-request: https://github.com/SerenityOS/serenity/pull/6038
47
Base/res/html/misc/link-over-zindex-block.html
Normal file
47
Base/res/html/misc/link-over-zindex-block.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<style>
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
list-style-type: none;
|
||||
}
|
||||
a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#contents {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
#links {
|
||||
width: 110px;
|
||||
float: left;
|
||||
padding: 5px;
|
||||
}
|
||||
#background {
|
||||
width: 120px;
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
background: cyan;
|
||||
border: 1px solid black;
|
||||
z-index: -10000;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id=contents>
|
||||
<div id=links>
|
||||
<ul>
|
||||
<li><a href="welcome.html">Home 1</a></li>
|
||||
<li><a href="welcome.html">Home 2</a></li>
|
||||
<li><a href="welcome.html">Home 3</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id=background></div>
|
||||
</div>
|
||||
</body>
|
||||
Reference in New Issue
Block a user