How to Wrap Placeholder Text for iOS Webpages
To wrap a placeholder text in an iOS webpage, you can try using the whiteSpace CSS property with the pre-wrap value. Here's an example:
HTML:
<input type="text" placeholder="324'324" class="wrapped-placeholder">
CSS:
.wrapped-placeholder::placeholder {
white-space: pre-wrap;
}
In the above code, '10; is the HTML entity for a line break. The white-space: pre-wrap; property makes the placeholder text wrap and preserve line breaks.
Make sure to include the CSS in the <head> section of your HTML file or in your CSS file.
Note: Not all browsers support line breaks in placeholders, so this solution might not work in all cases.
原文地址: https://www.cveoy.top/t/topic/pN2Z 著作权归作者所有。请勿转载和采集!