我知道我的脚本有什么问题。该按钮应使用 css 设置样式,但我得到的只是这个 https://ibb.co/cuwixy
CSS
.button {
background-color: #008CBA; /* Blue */
border: none;
color: white;
padding: 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button5 {border-radius: 50%;}
在 php 回显中的 html 表中编写脚本的按钮
while($row = $result->fetch_assoc()) {
echo "<td><form class='button button5'><input type='button' name='buy' value='buy'/></form></td>";
echo "</tr>";
}
最佳答案
你把类放在表单上,而不是按钮上
尝试:
while($row = $result->fetch_assoc()) {
echo "<td><form><input type='button' name='buy' value='buy' class='button button5'/></form></td>";
echo "</tr>";
}
关于php - 我在 html 表中的 Cssed 按钮没有得到正确的样式 php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50842613/