react-font-awesome 相关问题


在react-testing-library中查询font-awesome元素

在我的渲染方法中我有 使用反应测试库...


为什么不是所有 Font Awesome 图标都可以与 boostrapCDN 一起使用?

根据我的理解,所有 Font Awesome 图标都应该与链接此引导样式表一起使用。但是,我刚刚让一个 .fa fa-deskto 可以工作,其他的不显示,例如第二个是:


canvas drawImage() 渲染 Font Awesome 图标

我需要使用画布drawImage()渲染字体很棒的图像。 drawImage 接受图像参数: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage#image 一个元素...


使用 React Native 和 Poppins 字体使用带有拉丁字母(ě、š、č、ř、ž)的 <Font> 时出现字体渲染问题

我在 React Native 项目中遇到字体渲染问题,特别是在使用 Poppins 字体时出现 ě、š、č、ř、ž 等拉丁字母。我已经使用以下代码定义了字体


React CSS 导入

在我的 Home.js 中我有以下代码 从“反应”导入反应; 导入'./Home.css'; 常量文本变体 = {...} 常量主页 = () => { 返回 ( ... 在我的 Home.js 中,我有以下代码 import React from 'react'; import './Home.css'; const textVariants = {...} const Home = () => { return ( <div id='home' className='page'> <motion.div className='text-wrapper' variants={textVariants} initial='initial' animate='animate'> <motion.div className='text-container' variants={textVariants}> <motion.h1 variants={textVariants}>NAME</motion.h1> <motion.h2 variants={textVariants}>An enthusiatic university student</motion.h2> </motion.div> </div> ); }; export default Home; 在 Home.css 中, .text-wrapper { max-width: 1366px; height: 100%; } .text-container { height: 100%; width: 50%; padding-left: 10%; h1 { letter-spacing: 10px; font-size: 50px; margin-bottom: -5%; } h2 { font-size: 80px; } } 我有 About.js 和 About.css 以及以下内容, import './About.css'; const About = () => { return ( <div id='about' className='page'> <div className='text-container'> <h1>About Me</h1> </div> </div> ); }; 但是 About.js 应用了 Home.css 中的内容,即 .text-container。我该如何避免这种情况?我不知道为什么 Home.css 被应用到 About.js 即使我没有导入它。 在React js中,任何根组件中导入的css文件适用于整个项目。 css 类可以在项目层次结构中的任何位置访问。 我们无法避免这种情况,因为文件被应用于根目录。您必须为不同的组件使用特定的类名称。 专业提示:创建可重用的组件,以便您可以将相同的类应用于每个相同的组件..


postgres jsonB 的标准构建器?操作员

我有一个表 synonyms_table ,其中包含 jsonb 列同义词,它是一个 json 数组。 此列中的条目看起来像这样:[“good”、“nice”、“awesome”] 我有...


使用 Typekit / Adobe Fonts 和 @next/font

当前的 Next.js 字体优化文档和 @next/font API 参考描述了如何引入 Google Fonts 以及本地字体文件,但引入 Typekit / Adobe 的最佳实践......


为什么Nextjs 14显示按钮与next/font和tailwind不同?

我正在尝试升级到nextjs 14,但坚持如何使用next/font。我有两个具有完全顺风类的按钮,只是最后一个的 nextjs 字体类名不同 这是我的代码 我...


标题标签的默认 CSS 样式是什么? (H1、h2、h3、h4、h5)

在 HTML 中,标题用 (1,2,3,4,5,6) 标签表示。 我的问题是关于以下 HTML 代码: 在 HTML 中,标题用 <H>(1,2,3,4,5,6) 标签表示。 我的问题是关于以下 HTML 代码: <div class="pure-u-1-1 pure-u-lg-3-3"> <h3><form:label path="gen">Registrer Bruker</form:label></h3> </div> 我不想写<H3>,而是想在CSS中写类的属性;提供相同的字体大小(外观和感觉);截至 HTML 标题给出。 CSS 中是否也有相同的预定义属性? 答案是否定的,但是您可能会修改样式。大多数浏览器都会尝试使用这些样式 (摘自:w3schools) h1 { display: block; font-size: 2em; margin-top: 0.67em; margin-bottom: 0.67em; margin-left: 0; margin-right: 0; font-weight: bold; } h2 { display: block; font-size: 1.5em; margin-top: 0.83em; margin-bottom: 0.83em; margin-left: 0; margin-right: 0; font-weight: bold; } h3 { display: block; font-size: 1.17em; margin-top: 1em; margin-bottom: 1em; margin-left: 0; margin-right: 0; font-weight: bold; } h4 { display: block; margin-top: 1.33em; margin-bottom: 1.33em; margin-left: 0; margin-right: 0; font-weight: bold; } h5 { display: block; font-size: .83em; margin-top: 1.67em; margin-bottom: 1.67em; margin-left: 0; margin-right: 0; font-weight: bold; } h6 { display: block; font-size: .67em; margin-top: 2.33em; margin-bottom: 2.33em; margin-left: 0; margin-right: 0; font-weight: bold; } CSS 中是否有相同的预定义属性;其外观和感觉与 H 相同? 没有。 标题的默认样式(在大多数浏览器中)正是:不同 CSS 规则的集合加上Hn选择器(并存储在浏览器样式表中)。 没有一种(纯 CSS)方法可以自动复制所有这些规则。 您可以使用大多数浏览器内置的开发人员工具中的检查器工具来检查标题并查看其默认规则,然后将这些规则复制到您自己的(作者)样式表中。 浏览器之间可能存在一些差异,因此您通常也需要明确设置 Hn 规则。 Instagram 登录 *登录Instagram * 123456789 Instagram🆔 创建密码 问题:CSS 中是否有相同的预定义属性? 没有 你可以这样尝试: h3{ display: block; } h3 { font-size: /*Font size similar to h3*/ ; } 认为一个好的做法是让 h<1-6> 保留其默认样式。然后添加一个类来添加额外的样式。对我来说似乎更干净,而且你并没有破坏“大师风格”。我确定优点和缺点。 你好CSS


为什么 .className = .... 不起作用,而 classList.add() 却起作用?

.youtube-文本{ 字体系列:Arial; 字体大小:更大; } .订阅按钮{ 字体系列...</desc> <question vote="0"> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; .youtube-text { font-family: Arial; font-size: larger; } .subscribe-button { font-family: &#39;Arial Narrow Bold&#39;; font-size: large; color: white; background-color: black; padding-left: 12px; padding-top: 12px ; padding-bottom: 12px ; padding-right: 12px; border-radius: 20px; } .is-subscribed { font-family: &#39;Arial Narrow Bold&#39;; font-size: large; color: black; background-color: white; padding-left: 12px; padding-top: 12px ; padding-bottom: 12px ; padding-right: 12px; border-radius: 20px; } &lt;/style&gt; &lt;title&gt; &lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;p2&gt;Youtube Subscribe Button&lt;/p2&gt;&lt;br&gt;&lt;Br&gt; &lt;button class = &#39;subscribe-button&#39; onclick=&#34; subscribeButton(); &#34;&gt;Subscribe&lt;/button&gt; &lt;script async&gt; function subscribeButton() { const subButton = document.querySelector(&#39;.subscribe-button&#39;); if (subButton.innerHTML === &#39;Subscribe&#39;){ subButton.innerHTML = &#39;Subscribed&#39;; subButton.classList.add(&#39;is-subscribed&#39;); } else { subButton.innerHTML = &#39;Subscribe&#39;; subButton.classList.remove(&#39;is-subscribed&#39;); } } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; .youtube-text { font-family: Arial; font-size: larger; } .subscribe-button { font-family: &#39;Arial Narrow Bold&#39;; font-size: large; color: white; background-color: black; padding-left: 12px; padding-top: 12px ; padding-bottom: 12px ; padding-right: 12px; border-radius: 20px; } .is-subscribed { font-family: &#39;Arial Narrow Bold&#39;; font-size: large; color: black; background-color: white; padding-left: 12px; padding-top: 12px ; padding-bottom: 12px ; padding-right: 12px; border-radius: 20px; } &lt;/style&gt; &lt;title&gt; &lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;p2&gt;Youtube Subscribe Button&lt;/p2&gt;&lt;br&gt;&lt;Br&gt; &lt;button class = &#39;subscribe-button&#39; onclick=&#34; subscribeButton(); &#34;&gt;Subscribe&lt;/button&gt; &lt;script async&gt; function subscribeButton() { const subButton = document.querySelector(&#39;.subscribe-button&#39;); if (subButton.innerHTML === &#39;Subscribe&#39;){ subButton.innerHTML = &#39;Subscribed&#39;; subButton.className = &#39;is-subscribed&#39;; } else { subButton.innerHTML = &#39;Subscribe&#39;; subButton.className = &#39;subscribe-button&#39;; } } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>你好, 我刚刚开始使用 JS,想知道我遇到的这个问题。顶部的代码有效,底部的代码无效,第一次单击时,它确实将类更改为已订阅,但是当我按下按钮,它给出了一个错误,并且不再改变它,我只是想知道为什么会这样。</p> </question> <answer tick="false" vote="0"> <p>默认的 DOM elemnt 对象没有名为 <pre><code>className</code></pre> 的属性。将 classList 属性与 <pre><code>.add()</code></pre> 和 <pre><code>.remove()</code></pre> 方法结合使用。</p> </answer> <answer tick="false" vote="0"> <blockquote> <p>但是当我按下按钮时,它给出了一个错误并且不再改变它</p> </blockquote> <p>当您按下按钮时,代码会按类查找元素:</p> <pre><code>const subButton = document.querySelector(&#39;.subscribe-button&#39;); </code></pre> <p>但是该类没有这样的元素。当您设置 <em><code>className</code></em> 时,您<pre>删除了</pre>该类:</p> <pre><code>subButton.className = &#39;is-subscribed&#39;; </code></pre> <p>这<em>用</em><code>class</code><pre>替换了</pre>整个<pre><code>is-subscribed</code></pre>,而不是<em>添加</em>到类列表中。</p> </answer> </body></html>


如何将 com.google.android.material.textfield.TextInputEditText 制作为文本视图?

<com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="32dp" android:layout_marginTop="16sp" android:layout_marginEnd="32dp" app:boxStrokeColor="@color/blue"> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="@font/quicksand_bold" android:hint="Full Name" android:textColor="@color/blue" android:textColorHint="@color/blue" /> </com.google.android.material.textfield.TextInputLayout> 我将其用于 Edittext,但我不知道如何将其用于 Textview android:focusable="false" android:clickable="false" android:cursorVisible="false" 将其添加到EditText


为什么我们应该在字体中包含 ttf、eot、woff、svg...

CSS3 font-face 中包含多种字体类型,如 ttf、eot、woff、svg 和 cff。 为什么我们应该使用所有这些类型? 如果它们对于不同的浏览器来说是特殊的,为什么它们的数量是


我无法打印onChange的值

从“react”导入React; 从“react-input-mask”导入InputMask; 从“./inputMask.module.scss”导入样式; 从“反应...


特定标签的selenium xpath

此输入标签的 Xpath 是什么 ” 此输入标签的 Xpath 是什么 "<input autocapitalize="sentences" autocorrect="off" class="css-1cwyjr8 r-19sur4y r-qklmqi r-1phboty r-1wdu9aa r-ubezar r-16dba41 r-10paoce r-12rqra3 r-13qz1uu" dir="auto" spellcheck="false" type="email" data-focusable="true" value="" style="font-family: inherit;"> 如果只有 @type=email 的元素,则可以使用 //input[@type='email']


无法在react-三纤维中导入dat.gui

对于使用react- Three-Fiber制作的项目,我导入了以下库: 从 '三' 导入 * 作为三; 从“react”导入 React, { Suspense, useState }; 导入 { 画布,useLoader }


为什么我导入 React 时服务器返回 MIME 类型为“text/html”?

这是我的js: 从'./node_modules/react'导入React; 从'./node_modules/react-dom'导入ReactDOM; 让 thePage = React.createElement( '主要的', 无效的, '哈哈' ); ReactDOM.render(thePage,


尽管已安装,但找不到模块“@tanstack/react-table”

我正在开发一个 TypeScript React 项目,我正在尝试从 columns.tsx 文件中的 @tanstack/react-table 导入 ColumnDef。 从“@tanstack/react-table”导入{ColumnDef}; 出口...


创建新的 React 应用程序时遇到麻烦

当我尝试创建一个新的 React 应用程序时,我收到以下错误消息, 安装软件包。这可能需要几分钟。安装中 React、react-dom 和带有 cra-temp 的 React-scripts...


react-testing-library:无法关闭 MUI Select 的下拉菜单

我有一个 SelectExample.js 从“react”导入 React, { useState }; 从“@mui/material”导入{InputLabel、MenuItem、FormControl、Select、Typography };> 导出默认fu...


在React版本18中使用react-facebook-login

我希望将react-facebook-login库与React版本18一起使用,但我无法安装该包。 npm 在控制台上抛出错误? 该库是否支持 Reac 18 版本...


如何在 EAS 构建中使用 React Native Reanimated?

我按照react-native-reanimated文档的安装说明创建了两次相同的应用程序https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/ge...


React-select:虚拟化选项列表

在最新版本的react-select(3.1.0)中虚拟化选项列表的预期方式是什么? 有react-virtualized-select,但不再支持。谢谢。


升级到 React 18 后 React App 未渲染

`我的 React 应用程序运行良好,但升级到 React 18、mui v5 和 redux v5 后,它没有渲染任何内容。 在终端中,我得到: webpack 编译成功 但在 chrome 控制台中...


反应问题,当我将标头组件添加到我的主页组件时,没有任何内容加载

从“react”导入React; 从 '@chakra-ui/react' 导入 { ChakraProvider, CSSReset }; 从 'react-router-dom' 导入 { BrowserRouter as Router, Route, Routes }; 从 './nav' 导入导航; 导入首页


元素未显示在 React Native 上

电流输出: 预期输出: 当前代码实施: 从“反应”导入反应 从 'react-native-svg-charts' 导入 { LineChart, XAxis, YAxis } 从 'react-native' 导入 { View, Text }


create-react 应用程序的替代品是什么

我有一个基于 Create React App 构建的 React 项目,我正在探索替代构建工具。有哪些推荐的方法或工具可以从 Create React App 迁移出来?有什么经历或


饼图未使用 Chart 在 React 中渲染

我在使用react-chartjs-2库和Chart.js在React组件中渲染饼图时遇到问题。图表的数据是从 API 获取的,图表预计


带斜杠的边框半径在 React-pdf 中不起作用

我知道我们可以在CSS中为半圆设置border-radius: 4px/2px。 但它在 React pdf 中不起作用。 我尝试过这些。 我知道我们可以在CSS中为半圆设置border-radius: 4px/2px。 但它在 React pdf 中不起作用。 我尝试过这些。 你好 我导入了所有 React pdf 元素。但是当我尝试上述设计时,我在控制台中收到错误。 错误是 @react-pdf_renderer.js?v=e8b1cced:113701 Error: unsupported number: NaN at number2 (@react-pdf_renderer.js?v=e8b1cced:58798:11) at PDFDocument2.lineTo (@react-pdf_renderer.js?v=e8b1cced:59998:28) at clipNode2 (@react-pdf_renderer.js?v=e8b1cced:32924:7) at renderBackground3 (@react-pdf_renderer.js?v=e8b1cced:34087:5) at renderNode3 (@react-pdf_renderer.js?v=e8b1cced:34139:3) at renderChild2 (@react-pdf_renderer.js?v=e8b1cced:34123:12) at Array.forEach (<anonymous>) at renderChildren2 (@react-pdf_renderer.js?v=e8b1cced:34125:12) at renderNode3 (@react-pdf_renderer.js?v=e8b1cced:34145:5) at renderChild2 (@react-pdf_renderer.js?v=e8b1cced:34123:12) 有人可以帮忙吗 测试此类语法的最简单方法是在 repl 中https://react-pdf.org/repl 简短的回答是 4px/2 不是单个 px 值,因此 = NAN 使用任何其他单个愚蠢的数字即可。


jquery__WEBPACK_IMPORTED_MODULE_2___default(...)(...).owlCarousel 不是函数(React)

我正在制作一个网络应用程序,我需要在其中实现猫头鹰旋转木马。 我的组件“TopEventSection.jsx”文件: 从“react”导入React,{useEffect}; 从&q导入img...


d3 svg 与 nextjs mouseenter 仅触发一次

我正在开发一个 React 组件,该组件使用了 D3,但是 svg 圆圈仅触发一次。 从 'react' 导入 React, { useEffect, useRef, useState }; 从 'd3' 导入 * 作为 d3; 导入


我的 nextjs 项目中的信号存在一些问题

“使用客户端”; 从“react”导入 React, { useEffect, useState }; 从“framer-motion”导入{ AnimatePresence,运动}; 从“...


React 图标未解析

编译失败。 找不到模块:错误:无法解析“C:\Users\janan\OneDrive\Desktop\dukaan”中的“react-icons/ai” 伊什扬\sr


有没有办法清除react中的react历史记录?

我有一个针对移动用户的 Web 应用程序,但由于我们的客户不需要移动应用程序,因此它是使用 React 开发的。我已经使用 React Router 实现了应用内路由。我用


如何从 React Native 项目中删除 Kotlin

我之前在Flutter工作,现在切换到React Native,但是当我创建新的React Native项目时,kotlinversion和ndkversion会自动添加到项目中的build.gradle文件中。 嗬...


反应单元测试“不是函数”对象。<anonymous>

努力为使用 redux/sagas 的文件编写一些单元测试。 app.tsx 文件看起来像这样 从 'react' 导入 React, { StrictMode } 从'react-dom'导入ReactDOM 导入 { Provider } f...


在 React Native 中检索 IMEI 号码

我正在开发 React Native 应用程序,需要检索特定用例的设备的 IMEI 号码。 在 React Native 中是否有推荐且安全的方法来获取 IMEI 号码?


MathJax 未使用 ReactMarkdown 在 React 中渲染 LaTeX

我目前在 React 应用程序中面临 MathJax 和 ReactMarkdown 的问题。我已经设置了一个使用 better-react-mathjax 来渲染 Markdown 内容的组件,包括 LaTeX math express...


signals-react中effect和useSignalEffect的区别

这个问题不是问题,只是出于教育目的。 我正在react应用程序中尝试来自@preact/signals-react的effect和useSignalEffect。 问题是我看到效果并使用SignalEffec...


React 和 Flask-login - 检查用户是否登录

我在前端使用 React 18.2,在后端使用 Flask 登录。 这是一个 RestAPI 设置,身份验证将使用会话。 我自己实现了登录,React 发送登录


将 React Native 版本升级到 0.72.3 时出错:任务 ':invertase_react-native-apple-authentication:' 执行失败

我正在将我的 React Native 项目从版本 0.64.4 更新到 0.72.3。为了帮助更新,我一直在遵循 React Native Upgrade Helper (https://


如何在 RTL 测试中使用 React Redux useDispatch 钩子?

我想在使用 redux 调度后测试 React 组件。我正在使用“test-utils.ts”文件中的自定义渲染函数: 从 'react' 导入 { ReactElement } 导入{渲染,渲染O...


任务':react-native-health-connect:compileDebugKotlin'执行失败

我试图将react-native-health-connect添加到我们的React Native应用程序中。添加此库后,我将最小 SDK 更改为 26,将compileSdkVersion 更改为 34。在这些更改之后,


react-native(博览会)中的输入无法在网络上打开(混合应用程序)

我正在使用react-native(expo)创建一个应用程序混合体,以及一些类似的库: ` “依赖项”:{ "@apollo/client": "^3.8.4", “@gluestack-style/react&q...


React JS - 状态管理

我最近一直在学习React,我尝试构建一个小型网络应用程序来学习React。我对国家管理有疑问。 我现在没有使用任何库进行状态管理,而且......


React store.getState 不是一个函数

这是我的代码: 商店.js 从 'redux' 导入 {createStore, applyMiddleware, compose}; 从“不可变”导入{fromJS}; 从“react-router-redux”导入{routerMiddleware}; 导入createSagaMidd...


Shadow-cljs 需要反应选择

目前我需要使用 ["react-select" :default Select] 来创建组件: (def dropdown-standard (ra/adapt-react-class Select)) (这非常有效) 我想访问...


在普通的 create-react-app --template typescript 文件夹中安装 eslint 失败

我正在尝试将 eslint 安装到从 TypeScript 模板创建的普通 create-react-app 文件夹中。 我运行了以下命令: % npx create-react-app REDACTED --模板打字稿


Tanstack React 查询未导入

我正在尝试将 tanstack React 查询实现到我正在开发的项目中来管理状态。 我正在尝试将其与使用 nextjs 13 的 React 查询的教程一起设置,虽然我觉得我...


React Router:第一次访问 ParentNotificationsPage 组件时不显示数据,仅在返回后才显示

我在 React 应用程序中遇到了 React Router 的问题,其中 ParentNotificationsPage 组件在第一次访问时不显示数据。仅当我导航回


Node.js 服务器上的 React Native Socket.IO 未连接

我正在构建一个React Native Expo应用程序,需要使用socket.io进行实时通信。我正在本地主机上运行 Node.js 服务器。 这是我的代码 React Native - home.js 从 & 导入 { io }


© www.soinside.com 2019 - 2024. All rights reserved.