Line 12: | Line 12: | ||
} | } | ||
</style> | </style> | ||
− | <script> | + | <script> |
− | var fun = function (doc, win) { | + | var fun = function (doc, win) { |
− | var docEl = doc.documentElement, | + | var docEl = doc.documentElement, |
− | resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', | + | resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', |
− | recalc = function () { | + | recalc = function () { |
− | var clientWidth = docEl.clientWidth; | + | var clientWidth = docEl.clientWidth; |
− | if (!clientWidth) return; | + | if (!clientWidth) return; |
− | + | docEl.style.fontSize = 16 * (clientWidth / 1300) + 'px'; | |
− | + | }; | |
− | docEl.style.fontSize = 16 * (clientWidth / 1300) + 'px'; | + | if (!doc.addEventListener) return; |
− | + | win.addEventListener(resizeEvt, recalc, false); | |
− | + | doc.addEventListener('DOMContentLoaded', recalc, false); | |
− | + | } | |
− | + | fun(document, window); | |
− | } | + | </script> |
− | fun(document, window); | + | |
− | </script> | + | |
</head> | </head> | ||
<body> | <body> |
Revision as of 08:27, 4 October 2019
Project of XMU
The project mainly shows something
that can benefit human beings in the field of biosynthesis