我在我的反应应用程序中使用了很棒的字体图标,但由于某种原因它没有正确显示
这是我的代码:
const Header = () => {
return (
<div>
<div class="top float-right" >
<a href="https://t.me/memecoins">
<i class="fab fa-telegram fa-2x" ></i></a>
</div>
<a href="../"><img className="logo float-left " src={logo} alt="Logo"/></a>
</div>
Run Code Online (Sandbox Code Playgroud)
这就是CSS
.fab{
background-color:#263238;
}
Run Code Online (Sandbox Code Playgroud)
当我将字体很棒的图标放大到 3 倍或更大时,我看不到此下划线,它不再存在,仅以小图标尺寸显示
我将代码修复为:
const Header = () => {
return (
<div>
<a href="https://t.me/memecoins" rel="noopener noreferrer" target="_blank">
<i class="fab fa-telegram fa-3x float-right" ></i></a>
<a href="../"><img className="logo float-left " src={logo} alt="Logo"/></a>
<h1 className="text-center text-warning mt-3 mb-4">MEMECO.IN</h1>
<h5 className="text-center text-success mb-4">
<a href="https://boards.4channel.org/biz/catalog" target="_blank" rel="noopener …Run Code Online (Sandbox Code Playgroud) 我在玩一个使用 binance 和 cctx 的简单交易机器人
当我运行我的脚本时 node index.js
我得到这个长错误:
internal/modules/cjs/loader.js:323
throw err;
^
Error: Cannot find module '/home/ether/Documents/nodesendeth/node_modules/cctx/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:315:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:703:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:967:27)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/ether/Documents/nodesendeth/index.js:2:14)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32) {
code: 'MODULE_NOT_FOUND',
path: '/home/ether/Documents/nodesendeth/node_modules/cctx/package.json',
requestPath: 'cctx'
}
Run Code Online (Sandbox Code Playgroud)
所以它基本上找不到安装cctx的cctx模块,后来npm i cctx我也跑npm install了只是为了确保。
它还说验证 package.json 文件是否具有有效的主条目,它会执行以下操作:
{
"name": "nodesendeth", …Run Code Online (Sandbox Code Playgroud) 我在 python 和 pygame 中有一个小程序,但是当我运行它时,出现此错误:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "main.py", line 31, in <module>
main()
File "main.py", line 25, in main
board.draw(WIN)
File "/home/ether/Desktop/checkersai/checker/board.py", line 42, in draw
piece.draw(win)
File "/home/ether/Desktop/checkersai/checker/piece.py", line 32, in draw
pygame.draw.circle(win, GREY, (self.x, self.y), radius + self.OUTLINE)
TypeError: integer argument expected, got float
Run Code Online (Sandbox Code Playgroud)
这是错误所在的函数:
def draw(self, win):
radius = SQUARE_SIZE//2 - self.PADDING
pygame.draw.circle(win, GREY, (self.x, self.y), radius + self.OUTLINE)
pygame.draw.circle(win, self.color, (self.x, self.y), radius)
Run Code Online (Sandbox Code Playgroud)
这些是我使用的变量: …