大家好,我正在尝试在我的
下面添加一个长行<?php echo '$word'; ?>
,我只得到一个带下划线的单词。我想要得到的是这样的:
Name of the Owner: SAMPLE NAME HERE Birthdate:
_____________________________________ ____________
就像这样,这里是我当前的代码:
<input type="text" class="form-control input-sm" name="name" placeholder="" size="10" style='margin-right:.3em; border: none; border-color: transparent; pointer-events:none;text-decoration: underline;' value="<?php echo $fullname; ?>">
注意:请不要介意in-line
CSS。谢谢你们了!
PHP不支持字符串值中的下划线。你可以使用CSS。如以下:
input {
height:20px;
border: none;
box-shadow: -2px 5px 0px -2px grey, 2px 5px 0px -2px grey;
}
input:focus {
outline: none;
}
<input type="text" value=""/>
您可能应该在输入上使用底部边框。这样,下划线将随宽度
而缩放。input {
border-bottom: 1px solid #000;
/* This is used to ensure the border is close to the text
Adjust these values as needed. */
padding-bottom: 0;
/* Maybe a width here for a longer line past owner */
width: 200px;
}
无法理解您的问题但我认为这可能会有帮助
<?php echo "<u>". '$word' ."</u>"; ?>
这足以为字符串变量word