gpt4 book ai didi

css - 只是想给输入文本加粗字体

转载 作者:技术小花猫 更新时间:2023-10-29 11:15:51 29 4
gpt4 key购买 nike

我正在尝试通过下面的这种方式为输入提供粗体字体,但它不起作用..

<html>
<head>

</head>

<body>

<style type=”text/css”>

.jander2{

font-weight: bold;

}

</style>

<form method="post" action="somepage">
<input id="jander" class="jander2">
</form>

</body>
</html>

最佳答案

你的 <style>应该在 <head>部分:

<html>
<head>
<style type="text/css">
.jander2{
font-weight: bold;
}
</style>
</head>
<body>
<form method="post" action="somepage">
<input id="jander" class="jander2">
</form>
</body>
</html>

编辑: 为了让评论者满意:只使用标准双引号,不要像在 <style> 中那样使用特殊的弯引号标签。

关于css - 只是想给输入文本加粗字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5408292/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com