Skip to content

Commit a2c6def

Browse files
committed
refactor: 增加移动端适配
1 parent bbee2aa commit a2c6def

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister/Template5.razor

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
@page "/tutorials/template5"
2-
@layout TutorialsLoginLayout
2+
@layout TutorialsLayout
3+
4+
<HeadContent>
5+
<style>
6+
.main:has(.background-image) {
7+
height: calc(100vh - 56px - 175px);
8+
}
9+
10+
@@media (min-width: 768px) {
11+
.main:has(.background-image) {
12+
height: calc(100vh - 50px);
13+
}
14+
15+
.login-box {
16+
width: 350px;
17+
}
18+
}
19+
</style>
20+
</HeadContent>
321

422
<div class="background-image">
523
<div class="login-container">

src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister/Template5.razor.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
display: flex;
1212
justify-content: center;
1313
align-items: center;
14-
height: 100vh;
14+
height: 100%;
1515
}
1616

1717
.login-box {
1818
background: white;
1919
padding: 40px;
2020
border-radius: 10px;
2121
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
22-
width: 350px;
22+
width: auto;
2323
font-family: "Segoe UI", sans-serif;
2424
text-align: left;
2525
position: relative;

0 commit comments

Comments
 (0)