font

CSS 常用技巧

空扰寡人 提交于 2019-12-03 02:45:47
本文转载于: 猿2048 网站➸ https://www.mk2048.com/blog/blog.php?id=hikii1c2ab 概述 相信大家在写css属性的时候,会遇到一些问题,比如说:垂直对齐,垂直居中,背景渐变动画,表格宽度自适应,模糊文本,样式重置,清除浮动,通用媒体查询,自定义选择文本,强制出现滚动条,固定头部和页脚,自己在网上看到的一篇关于css的文章,感觉这里边一些常用的css代码片段对大家很有帮助,所以我就把这篇文章分享给大家,希望大家能够喜欢。 css代码片段 1、垂直对齐 如果你用 CSS ,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用 CSS3 的 Transform ,可以很优雅的解决这个困惑: .verticalcenter{ position: relative; top: 50%; -webkit-transform: translateY(-50%); -o-transform: translateY(-50%); transform: translateY(-50%); } 使用这个技巧,从单行文本、段落到box,都会垂直对齐。目前浏览器对 Transform 的支持是需要关注的, Chrome 4 , Opera 10 , Safari 3 , Firefox 3 , and Internet Explorer 9 均支持该属性

Minimum Font Size deprecated on ios version 6.0

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my XIB files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it? Update: image is no more available (was at https://skitch.com/hahmadi82/eyk51/cloud ) 回答1: minimumFontSize property of the UILabel is deprecated from iOS 6.0 onwards. An Alternative to the minimumFontSize is minimumScaleFactor . If you assign minimumFontSize/defaultFontSize to minimumScaleFactor , it works

How do I load external fonts into an HTML document?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do I load external font files into an HTML document. Example: Make the text "blah blah blah blah blah blah blah" a custom font from a TTF file in the same directory using HTML CSS and/or JAVASCRIPT 回答1: Take a look at this A List Apart article . The pertinent CSS is: @font-face { font-family: "Kimberley"; src: url(http://www.princexml.com/fonts/larabie/kimberle.ttf) format("truetype"); } h1 { font-family: "Kimberley", sans-serif } The above will work in Chrome/Safari/FireFox. As Paul D. Waite pointed out in the comments you can get it to

PDF Font encoding ― why can't I copy text from a PDF? [closed]

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After converting a PDF file, I cannot copy the text from it any more. All I get are unreadable characters which make no sense whatsoever. The font is French Script MT, but the encoding is custom (see result of Adobe reader > File > Document properties > Font ). Here is the PDF. I tried several methods... editing in PDF editor; notepad++; Word; Acrobat Pro. Is there anything wrong with the PDF file's source code which prevents the correct copying of text elements? Can this PDF's source code possibly be changed/modified/amended so that copy

Changing text line spacing

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm creating a PDF document consisting of text only, where all the text is the same point size and font family but each character could potentially be a different color. Everything seems to work fine using the code snippet below, but the default space between the lines is slightly greater than I consider ideal. Is there a way to control this? (FYI, type "ColoredText" in the code below merely contains a string and its color. Also, the reason I am treating the newline character separately is that for some reason it doesn't cause a

Get font of each line using PDFBox

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a way to get the font of each line of a PDF file using PDFBox? I have tried this but it just lists all the fonts used in that page. It does not show what line or text is showed in that font. List pages = doc.getDocumentCatalog().getAllPages(); for(PDPage page:pages) { Map pageFonts=page.getResources().getFonts(); for(String key : pageFonts.keySet()) { System.out.println(key+" - "+pageFonts.get(key)); System.out.println(pageFonts.get(key).getBaseFont()); } } Any input is appreciated. Thanks! 回答1: Whenever you try to extract text

Using Bootstrap, but Text not Responsive

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a school project : http://lauralynn87.github.io/WSP/Project/index.html and I am using the framework Bootstrap 3.0 - and almost everything is responsive, but the text. I've tried using percentages and ems for font sizes..but nothing is working. I know I'm missing something, but can't figure it out. Any help is appreciated. Thanks. 回答1: Fonts are not responsive if you use % or em etc. If you want to change the size of your font on different screen/window sizes, you have to use media queries in CSS. For example: @media all and

登录注册前台

元气小坏坏 提交于 2019-12-03 02:44:25
目录 前台 Login.vue Register.vue Header.vue 前台 Login.vue <template> <div class="login box"> <img src="@/assets/img/Loginbg.jpg" alt=""> <div class="login"> <div class="login-title"> <img src="@/assets/img/Logotitle.png" alt=""> <p>帮助有志向的年轻人通过努力学习获得体面的工作和生活!</p> </div> <div class="login_box"> <div class="title"> <span :class="{active: a0}" @click="changeLogin(0)">密码登录</span> <span :class="{active: a1}" @click="changeLogin(1)">短信登录</span> </div> <div class="inp" v-if="login_type===0"> <input v-model="username" type="text" placeholder="用户名 / 手机号码" class="user"> <input v-model="password" type=

Change font size depending on resolution

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm developing a Web page that uses different sizes for its different paragraphs, h... and so on. I'm using em sizes: font-size: 2em; , as an example. But when I change my screen resolution to a lower one, I want that size to a smaller one. For that purpose, I tried this code: <script> if ( screen.width > 1600) { document.write('<style>#centered h1 { font-size: 2em; } </style>'); } else if (screen.width <= 1600 && screen.width >= 1360) { document.write('<style>#centered h1 { font-size: 1.7em; } </style>'); } else if (screen.width < 1360 && >

How to include Roboto font in webpack build for Material UI?

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: For a progressive web app based on Material UI (React) and built with Webpack , how do I properly include Roboto font(s) so that the app does not depend on Google servers and fonts also work offline ? The installation page just references the Google fonts page , but that obviously forces fonts to be downloaded from Google servers. A similar Material UI Issue exists regarding Roboto font, but still relies on Google providing the font files. I found a NPM package providing the Roboto font files , but I'm not sure how to include those files as