line-height: ???;
do not want to set a fixed px, because it will change, how to set it to follow the element height 100%?
line-height: ???;
do not want to set a fixed px, because it will change, how to set it to follow the element height 100%?
vertical-align:middle;display:inline-block;
pinch like this
line-height:calc(100% - 0px);
if you just want the text to be centered vertically, you can use display:table-cell; or flex
line-height:1
if you don't mind the amount of code, you can center it by positioning, which is not recommended. Flex
increase pseudo class, 100% height. Then modify the horizontal center.
Previous: Vue drop-down refresh problem
Next: The Vue Cli3.0 event binding arrow function failed to get the this correctly
<style> p { text-indent: 2em; *2*66px* font-size: 16px; } .div { font-size: 66px; } < style> <div class="div"> ...