The solution of browser font less than 12px
1. Zoom through transform: scale()
<div class="box text1">The font size is 12px</div>
<! -- inside before adding the span tag, because transform:scale scales the width and height of the outer div -->
<div class="box text2">
<span> The font size is 8px</span>
</div>
Copy code
.box{
width: 200px;
height:100px;
margin-bottom: 10px;
border: 1px solid red ;
}
.text1{
font-size: 12px;
}
.text2 span{
display: inline-block;/*transform:scale()这This attribute scales only the elements whose width and height can be defined. */
font-size: 16px;
transform: scale(0.5) ;/* font-size: 16*0.5=8px */
transform-origin: left top;/* Adjustment of position*/
}
Read More:
- Google browser plug-in JavaScript errors Notifier
- How to Solve Webpack packag iconfont font error
- Vue JS import font.css error [How to Solve]
- How to use HPQC on Chrome browser
- [Solved] Font End Image Display Error: net::ERR_CONNECTION_RESET 431 (Request Header Fields Too Large)
- [Solved] react Chrome Browser Error: Uncaught TypeError: Cannot read properties of undefined (reading ‘forEach‘)
- [Solved] IE Browser Error: unhandled promise rejection error: access is denied. File stream Download
- CSS to achieve dynamic display of picture text by mouse touch
- [Chrome]: DevTools failed to load source map… (How to Solve)
- Method to solve uncaught typeerror: cannot set property ‘onclick’ of null error
- How to Solve Converting circular structure to JSON‘ Error
- How to Solve QT uses MSVC compiler to code error
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …
- React error boundary (What You Should Know & How to Solve)
- [Vue warn]: Error in callback for watcher “value“ (How to Solve)
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- How to Solve Vue cli syntax Close Error
- How to Solve Vue add element Install Error
- How to Solve electron import page Error
- Json.parse: All Error & How to Solve Them