gpt4 book ai didi

jquery-ui - css3.0 - 内容属性

转载 作者:太空宇宙 更新时间:2023-11-04 00:22:23 25 4
gpt4 key购买 nike

我写了一个css文件

.atleastTwoChars:after {
content: "2*";
float: left;
width: 16px;
height: 14px;
border: 0;
margin: 2px 3px 0px 3px;
color: red;
}

我是这样用的

<nobr>
<input type="hidden"
name="ctl00$objContentPageTag$spzContactInformation$txt_sContactZipCode$objHidden"
id="ctl00_objContentPageTag_spzContactInformation_txt_sContactZipCode_objHidden" value="0">
<input name="ctl00$objContentPageTag$spzContactInformation$txt_sContactZipCode$objTextBox"
type="text"
id="ctl00_objContentPageTag_spzContactInformation_txt_sContactZipCode_objTextBox"
class="xqh_LookUpTextBox_Edit">
<span id="ctl00_objContentPageTag_spzContactInformation_txt_sContactZipCode_spanImgMandatory"
class="atleastTwoChars">
</span>
</nobr>

JavaScript:

$('#ctl00_objContentPageTag_spzContactInformation_txt_sContactZipCode_spanImgMandatory')
.removeClass("xqh_LookUpTextBox_ImgMandatory")
.addClass("atleastTwoChars");
$('img[id*="txt_sContactZipCode_imgMandatory"]').remove();

问题:content (2*) 应该显示在文本框的末尾,但它却显示在开头,就像这样。

enter image description here

最佳答案

从您的 CSS 中删除 float: right;:JS Fiddle demo .

顺便说一下,根据 W3,nobr:

[...is] entirely obsolete, and must not be used by authors...

引用:

关于jquery-ui - css3.0 - 内容属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8555349/

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