字体样式设置

main
ptkbf2lr5 1 month ago
parent dcdd764edd
commit 551755fb61

@ -0,0 +1,48 @@
.container {
width: 100%;
max-width: 1280px; /* 设置最大宽度 */
height: 100vh; /* 视口高度 */
position: relative;
background: linear-gradient(90deg, #E7642A 0%, #E1BCE9 50%, #152DA9 100%);
}
.content {
width: 100%;
max-width: 710px;
height: 446px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
/* 其他样式 */
}
.background-image {
width: 100%;
max-width: 100%; /* 图片自适应宽度 */
height: auto; /* 保持图片比例 */
position: absolute;
top: 0;
right: 0;
bottom: 0;
}
@font-face {
font-family: 'Alfa Slab One';
src: url('AlfaSlabOne-Regular-2.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Inter';
src: url('Inter-Regular-9.otf') format('opentype');
font-weight: normal;
font-style: normal;
}
body {
font-family: 'Inter', sans-serif;
}
h1 {
font-family: 'Alfa Slab One', cursive;
}
Loading…
Cancel
Save