image - <styled component> 属性在 gatsby 服务后消失
问题描述
我正在为我的 gatsby 网站使用 < styled components >,除了一个细节外,一切都运行良好:在我“gatsby serve”之后,边框半径不适用于 Img。有任何想法吗?
const Headshot = styled(Img)`
box-shadow: 0 0.7em 1em 0 rgba(0,0,0,.3);
margin: 0 auto;
border-radius:100%;
`
这在检查“gatsby develop”上的 img 时显示:
.gttwKy {
box-shadow: 0 0.7em 1em 0 rgba(0,0,0,.3);
margin: 0 auto;
border-radius: 100%;
}
这在检查“gatsby serve”上的 img 时显示:
.lnclJt {
box-shadow: rgba(0, 0, 0, 0.3) 0px 0.7em 1em 0px;
margin: 0px auto;
}
谢谢!
解决方案
推荐阅读
- c - 如何按特定顺序设置位域并稍后检查该顺序
- c# - 如果它来自不同的按钮事件,如何强制编译器不考虑任何代码块
- ios - 在向上滚动更改 tableview 标题
- magento2 - Mage2 :传递给 Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() 的参数 1 必须是 Magento\Sales\Model\Order\Payment 的实例
- java - 如何将推送通知的已读回执发送到 Android 上的 Amazon Pinpoint?
- tensorflow - 输入必须是4维[1,30,144,192,3],tensorflow训练出错
- php - 在 Laravel 或原始 SQL 中创建基于过滤器的搜索的最佳方法是什么?
- outlook - Outlook Web 加载项入口页面(taskpaneurl)可以知道哪个任务窗格按钮触发访问吗?
- html - 添加内容时,内联块 div 元素未垂直对齐
- bash - 获取 bash 脚本并通过反引号执行为变量赋值