font-size

Why is text rendered with a greater font-size in Opera?

血红的双手。 提交于 2019-12-01 16:09:21
I'm working on an HTML page that needs to be more or less pixel-perfect, and I noticed that in Opera 10, fonts are rendering larger than they do in other browsers, even though the font-size is effectively the same. Please see this example page in Opera 10 and another browser like Firefox 3.6: http://troy.onespot.com/static/stack_overflow/opera_font_size.html Alternatively, here's a screenshot that illustrates the issue: http://skitch.com/troywarr/d47m1/font-size The red boxes behind the "50px" and "46px" text (both styled to have the corresponding font-size) both have a height of 50px. In

Why is IE9/Firefox showing a different font size in relation to other browsers?

拟墨画扇 提交于 2019-12-01 15:18:33
I'm programming the CSS of a site, and realized that the Internet Explorer 9 is showing different font size in relation to other browsers (Firefox, Chrome, Safari, IE7 and IE8). I've tried using some RESETS, and I am specifying the font in px , but IE9 still shows the difference in font size. I've tried using font-size in pt , in , percentage, but had no success. I changed the font before (Georgia, Times New Roman, Verdana). Some of them are shown larger, others are smaller in IE9. I checked the zoom settings and text size in IE. They are 100% and medium respectively. To illustrate, I created

Why is IE9/Firefox showing a different font size in relation to other browsers?

百般思念 提交于 2019-12-01 14:12:24
问题 I'm programming the CSS of a site, and realized that the Internet Explorer 9 is showing different font size in relation to other browsers (Firefox, Chrome, Safari, IE7 and IE8). I've tried using some RESETS, and I am specifying the font in px , but IE9 still shows the difference in font size. I've tried using font-size in pt , in , percentage, but had no success. I changed the font before (Georgia, Times New Roman, Verdana). Some of them are shown larger, others are smaller in IE9. I checked

input-placeholder css样式

早过忘川 提交于 2019-12-01 12:19:59
::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: #00648a; opacity: .8; font-size: 12px; } ::-moz-placeholder { /* Firefox 19+ */ color: #00648a; opacity: .8; font-size: 12px; } :-moz-placeholder { /* Firefox 19+ */ color: #00648a; opacity: .8; font-size: 12px; } :-ms-input-placeholder { /* IE 10+ */ color: #00648a; opacity: .8; font-size: 12px; } 来源: https://www.cnblogs.com/caoxen/p/11685196.html

Vanilla JavaScript: Resize font-awesome to fit container

只愿长相守 提交于 2019-12-01 11:52:14
I have been creating an audio player using vanilla JavaScript to manipulate the HTML <audio> element. The player is of dynamic size, with all elements scaled to fit the parent DIV. I have applied all methods I can find for scaling font to fit the parent container and combined solutions in a way that seems functional, however I cannot make font-awesome icons scale in the same way. The icons are contained in the following way: HTML: <div> <button> <a> <i class="fa fa-play"> </i> </a> </button> </div> My solution works by implementing window.addEventListener('resize', resizeFont); , with the

css3flex布局实现商品列表

我的梦境 提交于 2019-12-01 11:42:17
首先看图 手机商场经常会有商品列表功能,这样其实可以用flex布局实现 注意两个地方: 1、商品列表平衡间距(flex布局的换行加两端对齐) 2、中间文字行数不一样,会出现下方留下空白,如何解决(flex布局上下对齐) 代码: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus®"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <title>css3flex布局实现商品列表</title> <style type="text/css"> h2,h3,p{margin:0;padding:0} html,body{width:100%;height:100%;background-color:#eee} body{overflow:hidden;display: flex;justify-content: center} #big{ width:500px;background-color: #fff;margin:auto; display:flex; flex

Javascript convert width and height to font-size

折月煮酒 提交于 2019-12-01 09:43:55
问题 I'm not sure if this question has already been asked and answered but I haven't found any relevant result. I would like to know if it's possible to calculate and convert specific dimensions (width/height) to a font-size ? For example, I have : var textWidth = 150; var textHeight = 30; And I would like to get a font-size from these dimensions (pixels)? EDIT : Thanks dystroy, I finally managed to resolve this issue with your help. I used the function posted here and after that, it was not very

手机端样式

元气小坏坏 提交于 2019-12-01 07:59:56
@charset "UTF-8"; /****/ html,body,div,ul,ol,li,dd,dt,dl,p,h3,h4,span,input,textarea,select,option,table,tr,td,header,footer,section{padding:0;margin:0;box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;} h1,h2,h3,h4,h5,h6{margin: 0;padding: 0;-webkit-tap-highlight-color: rgba(0,0,0,0);} body{font-family:'Microsoft YaHei';width:100%;height:100%;min-width:320px;color:#666;-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none;font-size: 14px;} img{border:none;} ul,li{list-style-type:none;}

博客园simplememory模板自定义背景代码

人盡茶涼 提交于 2019-12-01 07:57:15
页面定制CSS代码 /*simplememory*/ #google_ad_c1, #google_ad_c2 {display:none;} .syntaxhighlighter a, .syntaxhighlighter div, .syntaxhighlighter code, .syntaxhighlighter table, .syntaxhighlighter table td, .syntaxhighlighter table tr, .syntaxhighlighter table tbody, .syntaxhighlighter table thead, .syntaxhighlighter table caption, .syntaxhighlighter textarea { font-size: 14px!important; } #home { opacity: 0.80; margin: 0 auto; width: 85%; min-width: 950px; background-color: #fff; padding: 30px; margin-top: 30px; margin-bottom: 50px; box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); } #blogTitle h1 {

博客园的博客美化

亡梦爱人 提交于 2019-12-01 07:20:32
1. 博客皮肤选择:En_summerGarden 2. 页面定制css代码 /*================================================================================>修改页面代码字体<===========*/ .cnblogs_code pre { font-family: Courier New!important; font-size: 16px!important; word-wrap: break-word; white-space: pre-wrap; } .cnblogs_code span { font-family: Courier New!important; font-size: 16px!important; line-height: 1.5!important; } /*================================================================================>修改背景样式<===========*/ #google_ad_c1, #google_ad_c2 {display:none;} .syntaxhighlighter a, .syntaxhighlighter div,