问题
In all other browsers, the placeholder of my input of type text starts where the cursor is flickering. However, in Microsoft Edge, the placeholder text appears ahead of the cursor. Is there any way to fix this?
Expected result:
Edge result:
回答1:
It seems I found the answer (the sooner I asked it here...)
The problem is with the text-indent property. Somehow in Edge it moves the cursor at an inequal distance to the placeholder. Using
padding-left: 10px;
instead of
text-indent: 10px;
solves the isse. Here's a working fiddle with both scenarios: jsfiddle
来源:https://stackoverflow.com/questions/40910797/edge-input-placeholder-not-aligned-with-text