border-image-repeat-002.htm (1899B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: The 'border-image-repeat' property with 'round' as a value</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/css3-background/#the-border-image-repeat" /> 7 <link rel="match" href="reference/border-image-repeat-002-ref.html" /> 8 <meta name="fuzzy" content="maxDifference=0-20; totalPixels=0-2160"> 9 <meta name="flags" content="image" /> 10 <meta name="assert" content="This test checks that the 'round' value for 'border-image-repeat' property specifies that the image is tiled (repeated) to fill the sides of the border image area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does." /> 11 <style type="text/css"> 12 div 13 { 14 border: 40px double red; 15 border-image-repeat: round; 16 border-image-slice: 27; 17 border-image-source: url("support/blue-and-red-diamonds-81x81.png"); 18 height: 102px; 19 margin: 70px; 20 width: 102px; 21 } 22 23 /* 24 102px divided by 40px == 2.55 25 Rounding of 2.55 == 3 26 So, there must be at least 3 blue squares 27 on each horizontal side and on each vertical side. 28 102px divided by 3 == 34px 29 The 6 blue squares at top and bottom edges 30 will each be 34px wide by 40px tall. 31 The remaining 6 blue squares at left and right edges 32 will each be 40px wide by 34px tall. 33 */ 34 35 </style> 36 </head> 37 <body> 38 <p>Test passes if there are three whole blue diamonds without clipping on four sides of the border.</p> 39 <div></div> 40 </body> 41 </html>