【问题标题】:Style Shape in Sketch from CSS来自 CSS 的 Sketch 中的样式形状
【发布时间】:2018-02-06 10:28:07
【问题描述】:

我有这个 CSS :

shadowColor: '#444',
shadowOffset: { width: 5, height: 5 },
shadowOpacity: 0.2,
shadowRadius: 8,
backgroundColor: 'white',
borderRadius: 10,

我想在 Sketch 上复制这种风格。 但它对阴影使用“模糊”和“扩散”属性。 而且我注意到如果您尝试手动操作,它会使用 box-shadow。

我的问题是: 我有这个 CSS 样式。我怎么能把它应用到我的形状上。 (有或没有插件)

草图版本 47.1

【问题讨论】:

    标签: css sketchapp


    【解决方案1】:

    对我来说,你的风格在草图应用程序中会被翻译成这样:

    shadowColor: '#444',                    // Color #444
    shadowOffset: { width: 5, height: 5 },  // X & Y offset to 5px
    shadowOpacity: 0.2,                     // Opacity 20 (the A in HSBA)
    shadowRadius: 8,                        // Look like it's the Blur
    backgroundColor: 'white',               // Bg color of the shape
    borderRadius: 10,                       // Border radius of the shape
    

    这是你需要的吗?

    PS : 这不是你代码中的一些 CSS 语法。

    【讨论】:

      猜你喜欢
      • 2017-07-10
      • 1970-01-01
      • 2023-04-02
      • 2020-04-26
      • 2015-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-13
      相关资源
      最近更新 更多