To keep div in ratio might be a problem sometimes.
Here shows 3 ways to keep it.
- apply to the element directly
- apply to its pseudo element
- use a placeholder image (might able to generate by js using canvas)
A Pen by WuChengHan on CodePen.
| using UnityEditor; | |
| using UnityEngine; | |
| using System.Collections; | |
| [InitializeOnLoad] | |
| public class FullscreenPlayMode : MonoBehaviour { | |
| //The size of the toolbar above the game view, excluding the OS border. | |
| private static int tabHeight = 22; |
To keep div in ratio might be a problem sometimes.
Here shows 3 ways to keep it.
A Pen by WuChengHan on CodePen.
| #!/usr/bin/python | |
| #coding=utf8 | |
| import os | |
| import re | |
| import sys | |
| import pymysql | |
| #=============================================== | |
| # normalize input string to prevent from errors |
| var langs = []; | |
| $('.clsStd tr').each(function (key, value) { | |
| var code, lang, country; | |
| $(value).find('td').each( | |
| function (index, data) { | |
| if (index % 2 == 0) { | |
| code = $(data).text().trim(); | |
| } else if (index % 2 == 1) { | |
| var string = $(data).text().split(/\(|\)/); | |
| lang = string[0].trim(); |