如何使框阴影从左向右变换而不将变换效果添加到文本本身.
此文本将根据内容更改大小,因此需要相应地调整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)我有一个自定义按钮组件和以下道具的一些基本控件;按钮种类、大小和子项(按钮文本)。
控制装置按预期工作。但是,我喜欢将控件命名从“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)