欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

邊框不& # 39;添加填充后,不能按預期工作

張吉惟1年前7瀏覽0評論

我是web開發新手,面臨著我的正確內容的問題。盡管申請& quot框大小:邊框-框& quot為了保持其大小,在my class = & quot右-內容& quot導致它拉伸。我想在不影響大小的情況下設置填充。請你檢查我的代碼,讓我知道是否有什么遺漏或需要改進?我將感謝你對你發現的任何問題的解釋,也將重視你對我的代碼是否組織良好或需要改進的意見。

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

.html {
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box; /* Firefox, other Gecko */
  box-sizing: border-box; /* Opera/IE 8+ */
}

.container {
  height: 100vh;
  background-color: hsl(30, 38%, 92%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.content {
  display: flex;
  background-color: hsl(0, 0%, 100%);
  width: 700px;
  height: 500px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-sizing: border-box;
}

.left-content,
.right-content {
  flex: 1;
  box-sizing: border-box;
}

.right-content {
  padding: 20px;
}

img {
  background-position: center;
  background-size: cover;
  width: 100%;
  height: 100%;
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- displays site properly based on user's device -->
    <link
      rel="icon"
      type="image/png"
      sizes="32x32"
      href="./images/favicon-32x32.png"
    />
    <link rel="stylesheet" href="style.css" />
    <title>Frontend Mentor | Product preview card component</title>
  </head>
  <body>
    <div class="container">
      <div class="content">
        <div class="left-content">
            <img
            src="https://i.ibb.co/SyCMzWZ/image-product-desktop.jpg"
            alt="perfume"
          />
        </div>
        <div class="right-content">
          <p>Perfume</p>
          <h1>Gabrielle Essence Eau De Parfum</h1>

          <p>
            A floral, solar and voluptuous interpretation composed by Olivier
            Polge, Perfumer-Creator for the House of CHANEL.
          </p>

          <div>$149.99</div>
          <p>$169.99</p>

          <button>Add to Cart</button>
        </div>
      </div>
    </div>

    <div class="attribution">
      Challenge by
      <a  target="_blank"
        >Frontend Mentor</a
      >. Coded by <a href="#">Your Name Here</a>.
    </div>
  </body>