Skip to content

Commit

Permalink
'添加示例'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddcheng2017 committed Nov 17, 2024
1 parent 05c04b8 commit 0f4dd6b
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
18 changes: 18 additions & 0 deletions docs/.vitepress/components/example/border.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div class="rect"></div>
</template>
<style>
.rect {
width: 300px;
height: 300px;
background: linear-gradient(to left, #196aa8, #196aa8) left top no-repeat,
linear-gradient(to bottom, #196aa8, #196aa8) left top no-repeat,
linear-gradient(to left, #196aa8, #196aa8) right top no-repeat,
linear-gradient(to bottom, #196aa8, #196aa8) right top no-repeat,
linear-gradient(to left, #196aa8, #196aa8) left bottom no-repeat,
linear-gradient(to bottom, #196aa8, #196aa8) left bottom no-repeat,
linear-gradient(to left, #196aa8, #196aa8) right bottom no-repeat,
linear-gradient(to left, #196aa8, #196aa8) right bottom no-repeat;
background-size: 1px 20px, 20px 1px, 1px 20px, 20px 1px;
}
</style>
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const vitePressOptions = {
},
nav: [
{ text: '首页', link: '/home/' },
{ text: '随手记', link: '/practice/windows' },
{ text: '随手记', link: '/practice/windows', activeMatch: '/practice/' },
{ text: '方法汇聚', link: '/method/Array/flat', activeMatch: '/method/' },
{ text: '总结资料', link: '/summary/flex', activeMatch: '/summary/' },
// {
Expand Down
8 changes: 7 additions & 1 deletion docs/example/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# 此处记录一些平时积累的一些demo
# 此处记录一些平时积累的一些demo

Css 四角边框
<border/>
<script setup>
import border from '.vitepress/components/example/border.vue'
</script>
31 changes: 31 additions & 0 deletions docs/practice/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<script setup>
import Border from '../.vitepress/components/example/border.vue'
console.log(Border, 'Border', Border.toString(), Border.toLocaleString())
</script>

# 常见示例

## Css 四角边框
```
<template>
<div class="rect"></div>
</template>
<style>
.rect {
width: 300px;
height: 300px;
background: linear-gradient(to left, #196aa8, #196aa8) left top no-repeat,
linear-gradient(to bottom, #196aa8, #196aa8) left top no-repeat,
linear-gradient(to left, #196aa8, #196aa8) right top no-repeat,
linear-gradient(to bottom, #196aa8, #196aa8) right top no-repeat,
linear-gradient(to left, #196aa8, #196aa8) left bottom no-repeat,
linear-gradient(to bottom, #196aa8, #196aa8) left bottom no-repeat,
linear-gradient(to left, #196aa8, #196aa8) right bottom no-repeat,
linear-gradient(to left, #196aa8, #196aa8) right bottom no-repeat;
background-size: 1px 20px, 20px 1px, 1px 20px, 20px 1px;
}
</style>
```
效果如下
<Border/>

0 comments on commit 0f4dd6b

Please sign in to comment.