我的样式框有问题。我需要在底部的方框中创建带有阴影的发光效果。创建此效果时,我被卡住了。
发光效果,我需要创建:
我试图创建这种效果,但是看起来很糟糕
html,
body {
width: 100%;
height: 100%;
margin:0;
}
.container {
background-color: black;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items:center;
}
.glow {
width: 60%;
height: 0px;
border-radius: 50%;
background-color: #fff;
box-shadow: 0 0 20px 0px yellow, 0 0 20px 10px #ffc600, 0px 0px 20px 0px yellow;
}Run Code Online (Sandbox Code Playgroud)
<div class="container">
<div class="glow"></div>
</div>Run Code Online (Sandbox Code Playgroud)
我正在开发新的应用程序,遇到错误。当我尝试调度操作时,出现如下错误:
类型“(dispatch: Dispatch) => Promise”的参数不可分配给“T”类型的参数。类型“(dispatch: Dispatch) => Promise”中缺少属性“type”,但类型“X”中需要属性“type”。
有人遇到过这个问题或者可以帮助我吗?我正在使用包:
这是我的代码:
Container:
import { connect } from 'react-redux';
import { Dispatch } from 'react';
import { loginUser, Actions } from './actions';
import Screen, { Props } from './Screen';
const mapDispatchToProps = (dispatch: Dispatch<Actions >): Props => ({
login: (userName: string, password: string) => {
dispatch(loginUser(userName, password)); }
});
export const ScreenContainer = connect(mapDispatchToProps)(Screen);
Props:
export interface Props {
login: …Run Code Online (Sandbox Code Playgroud) border ×1
css ×1
css3 ×1
frontend ×1
glow ×1
react-redux ×1
reactjs ×1
typescript ×1
web-frontend ×1