mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
73fa58da34
This allows you to push the outline a certain distance away from the border (or inside it, if the offset is negative).
68 lines
2.3 KiB
HTML
68 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Inline Node styling test</title>
|
|
<style>
|
|
body {
|
|
line-height: 200%;
|
|
}
|
|
|
|
.box {
|
|
width: 150px;
|
|
height: 200px;
|
|
margin: 10px;
|
|
padding: 5px;
|
|
border: 1px solid black;
|
|
}
|
|
|
|
.highlight {
|
|
background-color: orange;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.bg-highlight {
|
|
background-image: url("tile.png");
|
|
color: white;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.br-highlight {
|
|
border: 2px solid green;
|
|
border-radius: 6px;
|
|
box-shadow: 4px 4px 4px darkgreen;
|
|
}
|
|
|
|
.outline {
|
|
outline: 3px dotted magenta;
|
|
}
|
|
.outline2 {
|
|
outline: 1px solid red;
|
|
border-radius: 10px;
|
|
}
|
|
.outline3 {
|
|
outline: 2px solid green;
|
|
outline-offset: 5px;
|
|
border-radius: 10px;
|
|
border: 2px solid black;
|
|
}
|
|
.outline4 {
|
|
outline: 1px solid red;
|
|
outline-offset: -20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
Hello world <span class="highlight">this is some text</span> not in a box. <span class="bg-highlight">This text has a background</span> and <span class="br-highlight">this text has a shadow!</span>
|
|
<div class="box" style="background-color: rgba(255, 0, 255, 0.5);">
|
|
Hello world <span class="highlight">this is some text</span> in a box. <span class="bg-highlight">This text has a background</span> and <span class="br-highlight">this text has a shadow!</span>
|
|
</div>
|
|
<div class="box second">
|
|
Hello world <span class="highlight">this is some text</span> in a box. <span class="bg-highlight">This text has a background</span> and <span class="br-highlight">this text has a shadow!</span>
|
|
</div>
|
|
<div style="background-color:red;width:3px">This text should only have a strip of red on the left</div>
|
|
<div class="box">
|
|
<span class="outline">This text has an outline</span> and <span class="outline2">this text has an outline with a border radius,</span> and <span class="outline3">this also has a border.</span> <span class="outline4">This outline is a strikethrough.</span>
|
|
</div>
|
|
</body>
|
|
</html>
|