Skip to content

Instantly share code, notes, and snippets.

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;
@jackycute
jackycute / 3 ways to keep div ratio responsively (pure CSS).markdown
Created January 30, 2016 00:08
3 ways to keep div ratio responsively (pure CSS)

3 ways to keep div ratio responsively (pure CSS)

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.

#!/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();