wpt / css / css-backgrounds / background-origin / origin-border-box_with_position.html

Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-backgrounds/background-origin/origin-border-box_with_position.html


<!doctype html>
<html>
<head>
  <title>CSS Backgrounds Test:  background-origin:border-box & background-position</title>
  <link rel="author" title="finscn" href="mailto:finscn@gmail.com" >
  <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-origin" >
  <meta name="flags" content="">
  <link rel="match" href="../reference/origin-border-box_with_position-ref.html">

  <meta charset="utf-8">


<style type="text/css">

  div {
    border : 16px solid rgba(60,150,255,0.4);
    width : 450px;
    height : 224px;
    padding : 16px;
    margin-top : 8px;
    background-image : url("support/yellow-orange-blue-160x160.png");
    background-origin : border-box;
    background-position: -15px -15px;
  }

  .no-repeat {
    background-repeat : no-repeat;
  }

  .repeat {
    background-repeat : repeat;
  }

</style>

</head>
<body>

  <div class="no-repeat"></div>

</body>

</html>

/css/css-backgrounds/reference/origin-border-box_with_position-ref.html

<!DOCTYPE html>

  <meta charset="UTF-8">

  <title>CSS Reftest reference</title>

  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">

  <style>
  body
    {
      height: 568px;
      overflow-y: hidden;
      width: 584px;
    }

  div
    {
      display: inline-block;
      position: relative;
      vertical-align: bottom;
    }

  div.image
    {
      height: 288px;
      width: 514px;
    }

  img
    {
      clip: rect(15px, auto, auto, 15px);
      left: -15px;
      position: absolute;
      top: -15px;
    }

  div.light-blue-border
    {
      border: 16px solid rgba(60, 150, 255, 0.4);
      bottom: 288px;
      height: 256px;
      width: 482px;
    }
  </style>

<div class="image"><img src="../background-origin/support/yellow-orange-blue-160x160.png" alt="Image download support must be enabled"></div><div class="light-blue-border"></div>