84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
Using text-align on chrome didn’t work. Then I tried text-align-last:center and it worked, but it didn’t work on Safari;I couldn't find anything valuable after searching on Google. Has anyone encountered it?
There is a hack
Write a span at the select position, use js to bind the value in the span and the value of the select, center the span element, and hide the select.
It looks like this:
Just write the js content yourself
.pesu-select { text-align: center; border:solid 1px #000; } .pesu-select select { position: absolute; left: 0px; top: 0px; width: 100%; height: 42px; opacity: 0; } aaa aaa bbb ccc
aaa aaa bbb ccc
Other ways to solve the problem: wrap a layer of p around the select, do not set the width of the select (it is supported by the content), set the width of the container and text-align:center;
There is a hack
Write a span at the select position, use js to bind the value in the span and the value of the select, center the span element, and hide the select.
It looks like this:
Just write the js content yourself
Other ways to solve the problem: wrap a layer of p around the select, do not set the width of the select (it is supported by the content), set the width of the container and text-align:center;