CSS example (8): corner rectangle with custom width and height without Image

Source: Internet
Author: User

According to the analysis on the Google Analytics interface, I personally think it is good. Although the elements are a little more complex, and the appearance is not so beautiful, you can set the width and height of the rounded rectangle at will, which is flexible.
I wonder why Google uses element B.

Page source code: HTML code

  1. <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <HTML xmlns = "http://www.w3.org/1999/xhtml">
  3. <Head>
  4. <Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
  5. <Title> </title>
  6. <Style type = "text/CSS">
  7. HTML, body {
  8. Font-size: 12px;
  9. }
  10. . Round_border,. round_border B {
  11. Display: block;
  12. Text-align: center;
  13. }
  14. . Round_border_layer3,. round_border_layer2,. round_border_layer1,
  15. . Round_border_content {
  16. Border: 1px solid # c4c4c4;
  17. Border-width: 0 1px 0 1px;
  18. Height: 1px;
  19. Overflow: hidden;
  20. }
  21. . Round_border_layer3 {
  22. Margin: 0 3px;
  23. Background: # c4c4c4;
  24. }
  25. . Round_border_layer2 {
  26. Margin: 0 2px;
  27. }
  28. . Round_border_layer1 {
  29. Margin: 0 1px;
  30. }
  31. . Round_border_content {
  32. Height: 300px;
  33. Padding: 3px 6px;
  34. }
  35. /* Only for better appearance, not necessary, http://wallimn.iteye.com */
  36. . Round_border_layer2,. round_border_layer1 {
  37. Border-color: # d3d4d5;
  38. }
  39. /****************** Control bar ****************** ****/
  40. . Controlbar_border_layer3,. controlbar_border_layer2,. controlbar_border_layer1,
  41. . Controlbar_border_content {
  42. Background: # e9e9e9;
  43. Height: 1px;
  44. Overflow: hidden;
  45. }
  46. . Controlbar_border_layer3 {
  47. Margin: 0 3px;
  48. }
  49. . Controlbar_border_layer2 {
  50. Margin: 0 2px;
  51. }
  52. . Controlbar_border_layer1 {
  53. Margin: 0 1px;
  54. }
  55. . Controlbar_border_content {
  56. Height: 20px;
  57. Padding: 0 1em;
  58. Line-Height: 20px;
  59. Vertical-align: middle;
  60. }
  61. /* Only for better appearance, not necessary, http://wallimn.iteye.com */
  62. . Controlbar_border_layer1,... controlbar_border_layer2 {
  63. Border-color: # f2f2f2;
  64. }
  65. </Style>
  66. </Head>
  67. <Body>
  68. <Div style = "width: 260px;">
  69. <B class = "round_border">
  70. <B class = "round_border_layer3"> </B>
  71. <B class = "round_border_layer2"> </B>
  72. <B class = "round_border_layer1"> </B>
  73. </B>
  74. <Div class = "round_border_content">
  75. <B class = "round_border">
  76. <B class = "controlbar_border_layer3"> </B>
  77. <B class = "controlbar_border_layer2"> </B>
  78. <B class = "controlbar_border_layer1"> </B>
  79. </B>
  80. <Div class = "controlbar_border_content">
  81. CSS next door
  82. </Div>
  83. <B class = "round_border">
  84. <B class = "controlbar_border_layer1"> </B>
  85. <B class = "controlbar_border_layer2"> </B>
  86. <B class = "controlbar_border_layer3"> </B>
  87. </B>
  88. </Div>
  89. <B class = "round_border">
  90. <B class = "round_border_layer1"> </B>
  91. <B class = "round_border_layer2"> </B>
  92. <B class = "round_border_layer3"> </B>
  93. </B>
  94. </Div>
  95. </Body>
  96. </Html>

Effect (edit and debug the browser IE7 ):

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.