2
<textarea class="skinCondition-field vlongtext clear ui-input-text ui-body-d ui-corner-all ui-shadow-inset" type="text" placeholder="Update details of your present skin condition (e.g. normal, dry, flaky, etc). Optionally, add details of any past skin conditions, medication or skin treatments/surgeries undergone. You may also upload images/reports, so that doctors understand your condition better." value=""></textarea>

CSS:

textarea.ui-input-text.skinCondition-field {
    height:10.5em;
    white-space: normal;
    word-wrap: break-word;
    display: block;     
    word-wrap: break-word !important;
    white-space: normal!important;
    width: 100%;
}

甚至尝试过

textarea.ui-input-text.skinCondition-field::-webkit-input-placeholder {white-space: normal!important; word-break: break-all !important;word-wrap: break-word !important;}

但是问题仍然存在于 Galaxy s3 中。

4

3 回答 3

1

看看这个 FIDDLE是否有帮助。!

点击上面的链接。

textarea.ui-input-text.skinCondition-field {
    height:10.5em;
    white-space: normal;
    word-wrap: break-word;
    display: block;     
    word-wrap: break-word !important;
    white-space: normal!important;
    width: 100%;
}

编辑: 在这里,在这种情况下,提问者需要一个多行占位符!您可以通过以下方式获得相同的结果:

#text1::-webkit-input-placeholder::after {
    display:block;
    content:"Line 2\A Line 3";
}



#text2::-webkit-input-placeholder{
    color:transparent;
}

#text2::-webkit-input-placeholder::before {
    color:#666;
    content:"Line 1\A Line 2\A Line 3\A";
}

虽然,PLACEHOLDER 文本仅用于简短提示!因此,请改用 a<title>来获取更长的文本。

于 2013-07-10T07:47:25.350 回答
1
$('textarea')
    .addClass('placeholder')
    .each(function () {
        $(this).val($(this).attr('placeholder'));
    })

$('textarea').bind({
    'focus': function () {
        var placeholder = $(this).attr('placeholder');
        $(this)
            .removeClass('placeholder');

        if ($(this).val() == placeholder) {
            $(this).val('');
        }
    },
    'blur': function () {
        var placeholder = $(this).attr('placeholder');

        if ($(this).val() == '') {
            $(this)
                .val(placeholder)
                .addClass('placeholder');
        }
    }
});
于 2013-12-17T06:30:13.743 回答
0

我不确定,但尝试删除您的课程然后尝试

<textarea type="text" placeholder="Update details of your present skin condition (e.g. normal, dry, flaky, etc). Optionally, add details of any past skin conditions, medication or skin treatments/surgeries undergone. You may also upload images/reports, so that doctors understand your condition better." value=""></textarea>
于 2013-07-10T06:27:41.550 回答