پیشنمایش زنده
کد HTML
<div class="u-wrapper">
<div class="u-container">
<div class="u-inner">
<div class="u-icon">
<svg width="26" height="26" viewBox="0 0 24 24" fill="none">
<path
d="M12 16V4M12 4L8 8M12 4L16 8"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
></path>
<path
d="M5 16V18C5 19.1 5.9 20 7 20H17C18.1 20 19 19.1 19 18V16"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
></path>
</svg>
</div>
<div class="u-title">Upload pictures</div>
<div class="u-text">
Videos must be less than <strong>30 MB</strong><br />
and photos must be less than <strong>2 MB</strong>
in size.
</div>
<input class="u-input" type="file" id="fileInput" />
<button class="u-button" id="uploadBtn">Upload</button>
</div>
</div>
</div>
کد CSS
/* Outer card */
.u-container {
background: #ffffff;
border-radius: 24px;
padding: 18px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
/* Inner soft surface */
.u-inner {
width: 250px;
background: #fafafa;
border-radius: 18px;
padding: 24px 14px;
text-align: center;
}
/* Icon */
.u-icon {
width: 56px;
height: 56px;
border-radius: 14px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 18px;
color: #000000;
}
/* Title */
.u-title {
font-size: 18px;
font-weight: 600;
color: #000000;
margin-bottom: 10px;
}
/* Description */
.u-text {
font-size: 14px;
color: #7a7a7a;
line-height: 1.5;
margin-bottom: 24px;
}
/* Button */
.u-button {
width: 100%;
height: 48px;
background: #000000;
color: #ffffff;
border: none;
border-radius: 12px;
font-size: 15px;
font-weight: 500;
cursor: pointer;
transition:
transform 0.12s ease,
opacity 0.12s ease;
}
.u-button:active {
transform: scale(0.97);
opacity: 0.9;
}
/* Input */
.u-input {
display: none;
}