padding

Reduce the gutter (default 30px) on smaller devices in Bootstrap3?

匿名 (未验证) 提交于 2019-12-03 02:12:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In bootstrap 3 the gutter is defined as 30px (15px on each side of a column). The issue I'm running is that, for example if I shrink my screen down to be tiny, the gutters end up being wider than the columns themselves, as seen below (darker blue = column, lighter blue = gutter). Can you modify the gutter width of certain resolution states? (mobile, tablet, etc) 回答1: The gutter is construct by a left and right padding, you could use media queries to change this depending on your screen size: /* Small devices (tablets, 768px and up) */ @media

Create leading dots in CSS

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What is a nice way to do leading dots in a table of contents with CSS? Example: Link.............Chapter 1 Link.............Chapter 2 Link.............Chapter 3 回答1: taken from catchmyfame : "How is this done? Basically field label is wrapped in a div which has a small image of a dot applied repeatedly in the x direction as a background. This alone would cause the dots to flow under the text so to nullify that effect, the text itself is then wrapped in a span where the background color is set to match the color of the background of the

Padding is invalid and cannot be removed?

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Padding is invalid and cannot be removed Can anyone tell me what I can do to solve this issue? My code below is where I get the key and other data. If the cryptoMode is false, it will call the decrypt method, which is where the exception occurs: public void Cryptography(XmlDocument doc, bool cryptographyMode) { RijndaelManaged key = null; try { // Create a new Rijndael key. key = new RijndaelManaged(); const string passwordBytes = "Password1234"; //password here byte[] saltBytes = Encoding.UTF8.GetBytes("SaltBytes"); Rfc2898DeriveBytes p =

IOS - remove ALL padding from UITextView

北战南征 提交于 2019-12-03 02:10:24
问题 There are many great examples on SO to remove the left padding of a UITextView. How to lose margin/padding in UITextView? However, I need to remove the right padding too. I have tried... [tv setContentInset: UIEdgeInsetsMake(-4,-8,-8,-X)];//where X is any integer and just about every other permutation of the last two values to remove the padding and nothing seems to work. Have also tried [tv sizeToFit]; [tv setTextAlignment:[NSTextAlignmentRight]]; The following Text in the Textview says "00"

Shrink a YouTube video to responsive width

匿名 (未验证) 提交于 2019-12-03 02:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a YouTube video embedded on our website and when I shrink the screen to tablet or phone sizes it stops shrinking at around 560px in width. Is this standard for YouTube videos or is there something that I can add to the code to make it go smaller? 回答1: You can make YouTube videos responsive with CSS. Wrap the iframe in a div with the class of "videowrapper" and apply the following styles: .videowrapper { float: none; clear: both; width: 100%; position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0; } .videowrapper

vue - 动态绑定 class

拈花ヽ惹草 提交于 2019-12-03 02:09:43
<template> <div class="todo-item" :class="{'is-complete':todo.completed}" > <p> <input type="checkbox" @change="markComplete"> {{todo.title}} </p> </div> </template> <script> export default { name:'todo', props:["todo"], methods:{ markComplete(){ this.todo.completed = !this.todo.completed console.log(this.todo); } } } </script> <style scoped> .todo-item{ background: #f4f4f4; padding: 10px; border-bottom: 1px dotted #ccc ; } .is-complete{ text-decoration: line-through } .del{ background: #ff0000; color: #fff; border: none; padding: 5px 9px; border-radius: 50%; cursor: pointer; float: right; } <

Given final block not properly padded

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to implement password based encryption algorithm, but I get this exception: javax.crypto.BadPaddingException: Given final block not properly padded What might be the problem? (I am new to Java.) Here is my code: public class PasswordCrypter { private Key key; public PasswordCrypter(String password) { try{ KeyGenerator generator; generator = KeyGenerator.getInstance("DES"); SecureRandom sec = new SecureRandom(password.getBytes()); generator.init(sec); key = generator.generateKey(); } catch (Exception e) { e.printStackTrace(); } }

Sass Variable in CSS calc() function

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use the calc() function in a Sass stylesheet, but I'm having some issues. Here's my code: $body_padding: 50px body padding-top: $body_padding height: calc(100% - $body_padding) If I use the literal 50px instead of my body_padding variable, I get exactly what I want. However, when I switch to the variable, this is the output: body { padding-top: 50px; height: calc(100% - $body_padding); } How can I get Sass to recognize that it needs to replace the variable within the calc function? 回答1: Interpolate: body height: calc(100% - #{

Cut Corners using CSS

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm looking to "cut" the top left corner of a div, like if you had folded the corner of a page down. I'd like to do it in pure CSS, are there any methods? 回答1: If the parent element has a solid color background, you can use pseudo-elements to create the effect: div { height: 300px; background: red; position: relative; } div:before { content: ''; position: absolute; top: 0; right: 0; border-top: 80px solid white; border-left: 80px solid red; width: 0; } http://jsfiddle.net/2bZAW/ P.S. The upcoming border-corner-shape is exactly what you're

What is the difference between match_parent and fill_parent?

匿名 (未验证) 提交于 2019-12-03 02:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm a little confused about two XML properties: match_parent and fill_parent . It seems that both are the same. Is there any difference between them? 回答1: They're the same thing (in API Level 8+). Use match_parent . FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding) ... fill_parent : The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent . http://developer.android.com