tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

background-size-021.html (2228B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>CSS Backgrounds and Borders Test: background-size '100% 100%' with background-origin 'content-box'</title>
      6    <link rel="author" title="Intel" href="http://www.intel.com">
      7    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2012-11-09 -->
      8    <!--
      9    http://www.gtalbot.org/BrowserBugsSection/review/background-size-021-review.html
     10    -->
     11    <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" title="3.9. Sizing Images: the 'background-size' property">
     12    <link rel="match" href="reference/background-size-021-ref.html">
     13    <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-origin">
     14    <meta name="flags" content="image">
     15    <meta name="assert" content="Check if 'background-size' is '100% 100%' that it rescales the background image independently in both dimensions to completely cover the background positioning area (it is 100px by 100px as background-origin is 'content-box'). In this test, the background-image should be scaled from 40px wide and 20px tall to become 100px by 100px.">
     16 
     17    <style>
     18        #ref-overlapped-red {
     19            background-color: red;
     20            left: 30px;
     21            height: 100px;
     22            position: relative;
     23            top: 30px;
     24            width: 100px;
     25        }
     26        #test-overlapping-green {
     27            background-image: url("support/40px-wide-20px-tall-green-rect.png");
     28            background-origin: content-box;
     29            background-repeat: no-repeat;
     30            background-size: 100% 100%;
     31            border: transparent dotted 5px;
     32            bottom: 100px;
     33            height: 100px;
     34            padding: 25px;
     35            position: relative;
     36            width: 100px;
     37 
     38            /*
     39            Background positioning area is 100px wide by 100px tall.
     40            So, the image should be scaled to 100px by 100px.
     41            */
     42        }
     43    </style>
     44  </head>
     45  <body>
     46    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     47    <div id="ref-overlapped-red"></div>
     48    <div id="test-overlapping-green"></div>
     49  </body>
     50 </html>