Skip to content

Commit

Permalink
修改主页
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiAiAc committed May 4, 2023
1 parent 2249e4d commit 3d9b95e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
Binary file added public/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 43 additions & 4 deletions render/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ const btns = [{
</script>

<template>
<div>
<img class="avatar" src="/avatar.png" alt="">
</div>
<n-button v-for="item in btns" :key="item.key" @click="changeWin(item.key)">
{{ item.label }}
</n-button>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" class="logo" alt="Vite logo">
Expand All @@ -41,21 +47,54 @@ const btns = [{
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo">
</a>
</div>
<n-button v-for="item in btns" :key="item.key" @click="changeWin(item.key)">
{{ item.label }}
</n-button>

<HelloWorld msg="Vite + Vue" />
</template>

<style scoped>
<style scoped lang="scss">
.avatar {
--s: 280px;
--b: 5px;
--bgColor: #ecd078;
--borderColor: #c02942;
--f: 1;
--_g: 50% / calc(100% / var(--f)) 100% no-repeat content-box;
--_o: calc((1 / var(--f) - 1) * var(--s) / 2 - var(--b));
width: var(--s);
height: var(--s);
cursor: pointer;
padding-top: calc(var(--s) / 5);
outline: var(--b) solid var(--borderColor);
outline-offset: var(--_o);
border-radius: 0 0 500px 500px;
transition: 0.5s;
transform: scale(var(--f));
background:
radial-gradient(circle closest-side,
var(--bgColor) calc(99% - var(--b)),
var(--borderColor) calc(100% - var(--b)),
var(--borderColor) 99%,
#0000 100%) var(--_g);
-webkit-mask: linear-gradient(#000 0 0) no-repeat 50% calc(1px - var(--_o)) / calc(100% / var(--f) - 2 * var(--b) - 2px) 50%,
radial-gradient(circle closest-side, #000 99%, #0000) var(--_g);
}
.avatar:hover {
--f: 1.35;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #42b883aa);
}
Expand Down

0 comments on commit 3d9b95e

Please sign in to comment.