小编red*_*een的帖子

如何从左到右转换盒子阴影

如何使框阴影从左向右变换而不将变换效果添加到文本本身.

此文本将根据内容更改大小,因此需要相应地调整box-shadow.

目前我的代码看起来像这样.

body {
	background-color: #FFFFFF;
	margin: 0px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
	display: block;
	width: 85%;
	/*center vertically & horizontally*/
	position:absolute; top:50%; left:50%;
    -webkit-transform:translate(-50%,-50%);
    -moz-transform:translate(-50%,-50%);
    -ms-transform:translate(-50%,-50%);
    transform:translate(-50%,-50%);
}


a, a:visited, a:hover {
	/*display: block; this makes the whole line justified*/
	-ms-text-align-last: justify;
    -moz-text-align-last: justify;
    text-align-last: justify;
	text-decoration: none;
    color: #000000;
	/*box-shadow: inset 0 -1.3vw 0 0 #00f9ff;  OLD SCRIPT*/
}    



#test1 {
    display: inline-block;
    height: auto;
    width: auto;
    visibility: visible;
    box-shadow: inset 0 -1.3vw 0 0 …
Run Code Online (Sandbox Code Playgroud)

html css css3

3
推荐指数
1
解决办法
896
查看次数

将 Storybook Control 标签更改为不同的名称

我有一个自定义按钮组件和以下道具的一些基本控件;按钮种类、大小和子项(按钮文本)。

控制装置按预期工作。但是,我喜欢将控件命名从“children”更改为“label”

我将如何实现这一目标?

谢谢!

在此输入图像描述

export default {
  title: 'Components/Button',
  component: Button,
  argTypes: {
     kind: {
      options: ['primary', 'secondary', 'tertiary', 'danger', 'ghost'],
      control: { type: 'select' }
    },
    size: {
      options: ['default', 'sm', 'md', 'lg'],
      control: { type: 'select'},
    },
    },
};

const Template = (args) => <Button {...args} />;

export const Buttons = Template.bind({});
Buttons.args = {
  kind: 'primary',
  children: 'Button',

};
Run Code Online (Sandbox Code Playgroud)

javascript reactjs storybook

3
推荐指数
1
解决办法
3146
查看次数

标签 统计

css ×1

css3 ×1

html ×1

javascript ×1

reactjs ×1

storybook ×1