博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何安装svelte_如何在Svelte中动态应用CSS
阅读量:2510 次
发布时间:2019-05-11

本文共 657 字,大约阅读时间需要 2 分钟。

如何安装svelte

I had the need to dynamically apply some properties to an element, using , when one of its variables had a particular value.

当一个变量具有特定值时,我需要使用将某些属性动态地应用于元素。

The simplest solution I found was to add an HTML class when the selected variable value was true, and then I wrote some CSS that targeted that element with the class:

我找到的最简单的解决方案是,当selected变量的值为true时,添加一个HTML类,然后我编写了一些针对该元素CSS类:

  {value}

This kind of need is so common that Svelte added the ability to bind the class name to a variable value:

这种需求非常普遍,以至于Svelte添加了将类名绑定到变量值的功能:

  {value}

and in a more concise way, using the shorthand notation:

并以一种简明的方式使用速记符号:

  {value}

翻译自:

如何安装svelte

转载地址:http://samgb.baihongyu.com/

你可能感兴趣的文章
删远端分支报错remote refs do not exist或git: refusing to delete the current branch解决方法
查看>>
python multiprocessing遇到Can’t pickle instancemethod问题
查看>>
APP真机测试及发布
查看>>
通知机制 (Notifications)
查看>>
10 Things You Need To Know About Cocoa Auto Layout
查看>>
一个异步网络请求的坑:关于NSURLConnection和NSRunLoopCommonModes
查看>>
iOS 如何放大按钮点击热区
查看>>
ios设备唯一标识获取策略
查看>>
获取推送通知的DeviceToken
查看>>
Could not find a storyboard named 'Main' in bundle NSBundle
查看>>
CocoaPods安装和使用教程
查看>>
Beginning Auto Layout Tutorial
查看>>
block使用小结、在arc中使用block、如何防止循环引用
查看>>
iPhone开发学习笔记002——Xib设计UITableViewCell然后动态加载
查看>>
iOS开发中遇到的问题整理 (一)
查看>>
为什么你的App介绍写得像一坨翔?
查看>>
RTImageAssets插件--@3x可自动生成@2x图片
查看>>
iOS开发的一些奇巧淫技
查看>>
docker容器秒死的解决办法
查看>>
Linux(SUSE 12)安装jboss4并实现远程访问
查看>>