gpt4 book ai didi

html - 表单 - 无法选择或突出显示字段中的文本

转载 作者:行者123 更新时间:2023-11-28 17:00:52 25 4
gpt4 key购买 nike

我遇到了一个非常奇怪的问题,我无法在表单字段中突出显示我的文本。

我似乎无法弄清楚问题出在哪里,因为除此之外的一切似乎都在正常工作。

我似乎无法理解问题出在哪里 - 它在 Chrome 或 Safari 上不起作用。

{
position:relative;
width:100%;
margin-bottom:-20px;
}

.outerForm img {
width:800px;
text-align: center;
margin-left: auto;
margin-right: auto;
}

form {
display: table;
position:absolute;
top:0px;
left:0px;
right:0px;
margin-left: auto;
margin-right: auto;
color:black;
width:600px;;
height:300px;
margin-top: 100px;
}

.innerForm > input, .innerForm > label {
display: inline-block;
vertical-align: top;
margin-left: 5px;
margin-top: 25px;
margin-right: 5px;
}

.innerForm > label {
width:70px;
text-align: left;
}

#messageLabel {

}

input[type="text"] {
width:200px;
height:30px;
border:none;
outline:none;
box-shadow: none;
background-color:transparent;
border-bottom: 1px solid black;
}

textarea {
resize: vertical;
width:85%;
border:none;
outline:none;
box-shadow: none;
background-color: transparent;
padding-bottom: 18%;
border-bottom: 1px solid black;
margin-top: 20px;
}

textarea:focus {
border:none;
outline:none;
background-color: transparent;
box-shadow: none;
border-bottom: 1px solid red;
}

.innerForm > h4 {
margin-bottom:-10px;
text-transform:none;
font-family: 'Novecento sans wide';
}

input[type="text"]:focus, input[type="textarea"] {
border:none;
outline:none;
background-color:transparent;
box-shadow: none;
border-bottom:1px solid red;
}

#submitBtn {
background-color:transparent;
color:black;
font-weight:400;
border:none;
outline:none;
border:2px solid white;
padding:10px 20px 10px 20px;
font-size: 15px;
margin-top:15px;
transition: all 0.5s ease;
}

#submitBtn:hover {
background-color: #0080ff;
color:white;
}
<div class="outerForm">
<img id="cardImage" class="img-responsive" src="PlayingCardTemplate.png"/>
<form id="contactForm" action="Contact.php" method="POST">
<div class="innerForm">
<h4>Arshdeep Soni</h4>
<label id="nameLabel" for="name">Name:</label>
<input id="name" name="name" type="text"/>
<label id="phoneLabel" for="phone">Phone:</label>
<input id="phone" name="phone" type="text"/>
<label id="emailLabel" for="email">Email:</label>
<input id="email" name="email" type="text"/>
<label id="occasionLabel" for="occasion">Occasion:</label>
<input id="occasion" type="text" name="occasion"/>
<label id="messageLabel" for="message">Message:</label>
<textarea id="message" name="message" ></textarea>
<input type="submit" value="Submit" id="submitBtn" name="submit"/>
</div>
<p id="feedback"></p>
</form>
</div>

最佳答案

在 CSS 样式表中查找 ::selection。导入的样式表或主题可能包含 ::selection{background:transparent出于多种原因。寻找那个类(class)并对其进行编辑可以解决问题。您还可以添加 color: 以便为所选内容中的文本着色。

对于 mozilla 使用 ::-moz-selection

关于html - 表单 - 无法选择或突出显示字段中的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31313471/

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