使用HTML()标签时,如何在HREF文本和其余文本主体之间删除空间
我将用户可以单击以访问的闪亮应用程序中包括外部链接;但是,当我运行该应用程序时,将围绕HREF链接插入其他空白。
这是我的代码在两个不同的斑点中的外观:我还附加了应用程序上的外观的屏幕截图。
p(shiny::HTML("<span style = 'color: #a1a75f'>  In 2022, a total of 1,277 Hawaiʻi residents ages 18 and older completed the survey. Data were collected from February through April 2022 via email, phone, postcard, and social media. Among respondents, 48% identify as Native Hawaiian and 52% as non-Hawaiian. About a quarter (28%) of respondents are from Honolulu County, 26% from Maui County, 24% from Hawaiʻi County, and 22% from Kauaʻi County. The confidence interval for the state—including breakouts for Native Hawaiians and non-Hawaiians—is 95% or higher. The county level confidence interval is 90%. For more details about confidence intervals please click<a href='https://www.census.gov/programs-surveys/saipe/guidance/confidence-intervals.html'>here.</a></p>"),
style = "padding-bottom: 25px; padding-left: 25px"),
p(shiny::HTML("<span style = 'color: #a1a75f'>Please click<a href='https://www.ksbe.edu/research/imi_pono_hawaii_wellbeing_survey/'>here</a>for more information on the survey and to access published briefs.</span></p>"),
style = "padding-bottom: 25px; padding-left: 25px")
“ nofollow noreferrer”>
I am including external links in my shiny app that a user can click on to access; however, when I run the app, additional white space is inserted around the href link.
Here's what my code looks like in two different spots where I insert links: I've also attached a screenshot of the appearance on the app.
p(shiny::HTML("<span style = 'color: #a1a75f'> In 2022, a total of 1,277 Hawaiʻi residents ages 18 and older completed the survey. Data were collected from February through April 2022 via email, phone, postcard, and social media. Among respondents, 48% identify as Native Hawaiian and 52% as non-Hawaiian. About a quarter (28%) of respondents are from Honolulu County, 26% from Maui County, 24% from Hawaiʻi County, and 22% from Kauaʻi County. The confidence interval for the state—including breakouts for Native Hawaiians and non-Hawaiians—is 95% or higher. The county level confidence interval is 90%. For more details about confidence intervals please click<a href='https://www.census.gov/programs-surveys/saipe/guidance/confidence-intervals.html'>here.</a></p>"),
style = "padding-bottom: 25px; padding-left: 25px"),
p(shiny::HTML("<span style = 'color: #a1a75f'>Please click<a href='https://www.ksbe.edu/research/imi_pono_hawaii_wellbeing_survey/'>here</a>for more information on the survey and to access published briefs.</span></p>"),
style = "padding-bottom: 25px; padding-left: 25px")
What are solutions to remove the white space between the regular text and href text?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
padding-left:25px应该是0。如果您需要特定元素的填充,请给Span a类
&lt; span class =“ there-link”&gt;
,然后添加您的样式而无需填充padding-left: 25px should be 0. If you need the padding for specific elements, give the span a class
<span class="here-link">
and then add your styles without the padding