[英]unable to add a border to popup modal
I am using a Popup modal component from the reactjs-popup library.我正在使用 reactjs-popup 库中的 Popup 模态组件。
export default () => (
<Popup
trigger={<button className="button"> Guide </button>}
modal
nested
>
{(close: any) => (
<div className="modal">
<button className="close" onClick={close}>
×
</button>
<div className="header"> Guide </div>
<div className="content">
{' '}
<img src={img} alt="charts" className="charts" />
What is overfitting?
<br />
What is underfitting?
This example demonstrates the problems of underfitting and overfitting and how we can use linear regression with polynomial features to approximate nonlinear functions.
</div>
<div className="actions">
</div>
</div>
)}
</Popup>
);
This is how it looks like:这是它的样子:
I want to add a thick black border to the popup component.我想为弹出组件添加一个粗黑边框。 How can I do so?我该怎么做? My current css doesnt seem to work.我目前的 css 似乎不起作用。
.modal {
font-size: 12px;
border-color: black;
border-radius: 100px;
}
You need to set border-style: solid;
你需要设置border-style: solid;
the default is none
.默认为none
。 (maybe border-width
too) (也可能border-width
)
add: border: solid 1px #000;添加:边框:实心1px#000;
.modal {
font-size: 12px;
border-radius: 100px;
border: solid 1px #000;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.