css 技巧和提示

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 技巧和提示相关的知识,希望对你有一定的参考价值。

/* From http://apps.eky.hk/css-triangle-generator/ */

#triangle {
  width: 0; 
  height: 0; 
  border-style: solid; 
  border-width: 0 100px 100px 100px; 
  border-color: transparent transparent pink transparent;
}

/* OR */

/* Create on DIV */
#arrow:before, #arrow:after { 
  position: absolute; content: ""; width: 0; height: 0; border-style: solid; 
}
		#arrow:after { border-color: transparent transparent #FFF transparent;
			border-width: 9px; top: -18px; left: 21px
		}
		#arrow:before { border-color: transparent transparent pink transparent;
			border-width: 10px; top: -20px; left: 20px;
		}
		
/* How to make a TEXT field and SUBMIT button same height and stick together.  */

input {
  height: 30px; 
  margin: 0; 
  vertical-align: top;
  /* What makes it possible */
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;  
}

input[type="text"] { width: 300px; margin: 0; }
input[type="submit"] { width: 100px; margin: 0; }

/* Make sure text box and submit are on SAME LINE with
NO SPACES in BETWEEN each other */

以上是关于css 技巧和提示的主要内容,如果未能解决你的问题,请参考以下文章

常忽略的css技巧

如何使用纯 CSS 创建“工具提示尾部”?

Typora标题自动编号+设定快捷键技巧

Bootstrap常用技巧lrs

温故知新——CSS黑魔法小技巧可以少些不必要的js

CSS面试须知,哪些需要掌握得CSS技巧