jQuery/JavaScript: convert pixels to em in a easy way
问题 I am looking for a easy way to add a line of code to a plugin of mine, to convert a couple of pixel values into em values, because the layout of my project needs to be in ems. Is there an easy way to do this, because I don't want to add a third-party plugin to the site. Won't post the code here, as it has nothing to do with the plugin it self. Thanks. Example: 13px -> ??em 回答1: I think your question is very important. Since the classes of display resolutions are rapidly increasing, using em