Files
hotgo/web/src/views/addons/hgexample/comp/text/gradient/index.vue

71 lines
4.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<n-space vertical>
<n-card
:segmented="{ content: true, footer: true }"
header-style="padding:10px"
footer-style="padding:10px"
>
<template #header> 渐变文字 </template>
<template #header-extra>
<n-gradient-text type="success"> 渐变文字成了 </n-gradient-text>
</template>
<n-space vertical>
<n-gradient-text style="white-space: normal" type="success">
<p
>苏轼1037年1月8日-1101年8月24日字子瞻和仲号铁冠道人东坡居士世称苏东坡苏仙汉族眉州眉山四川省眉山市祖籍河北栾城北宋著名文学家书法家画家历史治水名人苏轼是北宋中期文坛领袖在诗散文画等方面取得很高成就文纵横恣肆诗题材广阔清新豪健善用夸张比喻独具风格与黄庭坚并称苏黄词开豪放一派与辛弃疾同是豪放派代表并称苏辛散文著述宏富豪放自如与欧阳修并称欧苏唐宋八大家之一苏轼善书宋四家之一擅长文人画尤擅墨竹怪石枯木等与韩愈柳宗元和欧阳修合称千古文章四大家作品有东坡七集东坡易传东坡乐府潇湘竹石图卷古木怪石图卷</p
>
</n-gradient-text>
</n-space>
</n-card>
<n-card
:segmented="{ content: true, footer: true }"
header-style="padding:10px"
footer-style="padding:10px"
>
<template #header> 渐变文字 </template>
<template #header-extra>
<n-gradient-text type="warning"> 渐变文字成了 </n-gradient-text>
</template>
<n-space vertical>
<n-gradient-text style="white-space: normal" type="warning">
<p
>白居易772846字乐天号香山居士又号醉吟先生祖籍太原到其曾祖父时迁居下邽生于河南新郑是唐代伟大的现实主义诗人唐代三大诗人之一白居易与元稹共同倡导新乐府运动世称元白与刘禹锡并称刘白白居易的诗歌题材广泛形式多样语言平易通俗诗魔诗王之称官至翰林学士左赞善大夫公元846年白居易在洛阳逝世葬于香山白氏长庆集传世代表诗作有长恨歌卖炭翁琵琶行</p
>
</n-gradient-text>
</n-space>
</n-card>
<n-card
:segmented="{ content: true, footer: true }"
header-style="padding:10px"
footer-style="padding:10px"
>
<template #header> 自定义颜色 </template>
<template #header-extra>
<n-gradient-text gradient="linear-gradient(90deg, red 0%, green 50%, blue 100%)">
渐变文字成了
</n-gradient-text>
</template>
<n-space vertical>
<n-gradient-text
gradient="linear-gradient(90deg, red 0%, green 50%, blue 100%)"
style="white-space: normal"
>
<p
>杜甫712770字子美自号少陵野老世称杜工部杜少陵汉族河南府巩县今河南省巩义市唐代伟大的现实主义诗人杜甫被世人尊为诗圣其诗被称为诗史杜甫与李白合称李杜为了跟另外两位诗人李商隐与杜牧即小李杜区别开来杜甫与李白又合称大李杜他忧国忧民人格高尚他的约1400余首诗被保留了下来诗艺精湛在中国古典诗歌中备受推崇影响深远759-766年间曾居成都后世有杜甫草堂纪念</p
>
</n-gradient-text>
</n-space>
</n-card>
</n-space>
</div>
</template>
<script lang="ts" setup></script>
<style lang="less" scoped>
p {
font-size: 14px;
line-height: 2;
text-indent: 28px;
}
</style>