- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Background Borders</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="setting.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body class="set">
    <div class="portrait"></div>
    <div class="portrait portrait-content-box"></div>
    <div class="portrait portrait-border-box"></div>
  </body>
</html>
CSS
.portrait {
  box-sizing: border-box;
  padding: 20px;
  width: 200px;
  height: 200px;
  border: 20px solid rgba(255, 255, 0, 0.4);
  background: url("img/muffin.jpg") no-repeat #ffffff;
  background-origin: padding-box;
  background-size: 100% 100%;
}
You’ve gone to a different page
Goalscompleted
0
- For the .portrait-content-boxportrait, set borders for thecontent-boxbackground,
- and then assign border-boxto the.portrait-border-boxportrait.

Comments