mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
8.5 KiB
JavaScript
2 lines
8.5 KiB
JavaScript
/*! For license information please see 409.4a242183.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["409"],{84322:function(s,a,n){"use strict";n.r(a);var l=n("80681");let t=["innerHTML"];a.default={setup:()=>({html:""}),render:()=>((0,l.wg)(),(0,l.iD)("div",{class:"van-doc-markdown-body",innerHTML:'<h1>Built-in Style</h1>\n<div class="van-doc-card"><h3 id="intro" tabindex="-1">Intro</h3>\n<p>Vant contains some common styles that can be used directly by the className.</p>\n</div><div class="van-doc-card"><h3 id="text-ellipsis" tabindex="-1">Text ellipsis</h3>\n<p>When the text content length exceeds the maximum container width, the excess text is automatically omitted.</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-ellipsis"</span>></span>\n This is a paragraph that displays up to one line of text, and the rest of the\n text will be omitted.\n<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-multi-ellipsis--l2"</span>></span>\n This is a paragraph that displays up to two lines of text, and the rest of the\n text will be omitted.\n<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-multi-ellipsis--l3"</span>></span>\n This is a paragraph that displays up to three lines of text, and the rest of\n the text will be omitted.\n<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="hairline" tabindex="-1">Hairline</h3>\n<p>Add 1px border under the Retina screen for the element, based on a pseudo element.</p>\n<pre><code class="language-html"><span class="hljs-comment"><!-- border top --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-hairline--top"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-comment"><!-- border bottom --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-hairline--bottom"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-comment"><!-- border left --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-hairline--left"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-comment"><!-- border right --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-hairline--right"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-comment"><!-- border top & bottom --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-hairline--top-bottom"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-comment"><!-- full border --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-hairline--surround"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="safe-area" tabindex="-1">Safe Area</h3>\n<p>Enable safe area.</p>\n<pre><code class="language-html"><span class="hljs-comment"><!-- top --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-safe-area-top"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n\n<span class="hljs-comment"><!-- bottom --></span>\n<span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-safe-area-bottom"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="animation" tabindex="-1">Animation</h3>\n<pre><code class="language-html"><span class="hljs-comment"><!-- fade in --></span>\n<span class="hljs-tag"><<span class="hljs-name">transition</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"van-fade"</span>></span>\n <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">v-show</span>=<span class="hljs-string">"visible"</span>></span>Fade<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n<span class="hljs-tag"></<span class="hljs-name">transition</span>></span>\n\n<span class="hljs-comment"><!-- slide up --></span>\n<span class="hljs-tag"><<span class="hljs-name">transition</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"van-slide-up"</span>></span>\n <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">v-show</span>=<span class="hljs-string">"visible"</span>></span>Slide Up<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n<span class="hljs-tag"></<span class="hljs-name">transition</span>></span>\n\n<span class="hljs-comment"><!-- slide down --></span>\n<span class="hljs-tag"><<span class="hljs-name">transition</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"van-slide-down"</span>></span>\n <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">v-show</span>=<span class="hljs-string">"visible"</span>></span>Slide Down<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n<span class="hljs-tag"></<span class="hljs-name">transition</span>></span>\n\n<span class="hljs-comment"><!-- slide left --></span>\n<span class="hljs-tag"><<span class="hljs-name">transition</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"van-slide-left"</span>></span>\n <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">v-show</span>=<span class="hljs-string">"visible"</span>></span>Slide Left<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n<span class="hljs-tag"></<span class="hljs-name">transition</span>></span>\n\n<span class="hljs-comment"><!-- slide right --></span>\n<span class="hljs-tag"><<span class="hljs-name">transition</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"van-slide-right"</span>></span>\n <span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">v-show</span>=<span class="hljs-string">"visible"</span>></span>Slide Right<span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n<span class="hljs-tag"></<span class="hljs-name">transition</span>></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="haptics-feedback" tabindex="-1">Haptics Feedback</h3>\n<p>Add haptics feedback for an element. When touched, the opacity of the element is reduced.</p>\n<p>Usually used in clickable elements such as button.</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-haptics-feedback"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="clearfix" tabindex="-1">Clearfix</h3>\n<p>Clear floated content within a container.</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"van-clearfix"</span>></span><span class="hljs-tag"></<span class="hljs-name">div</span>></span>\n</code></pre>\n</div>'},null,8,t))}}}]); |