border

Curved line at the bottom of border in CSS

折月煮酒 提交于 2021-02-08 05:13:58
问题 I need this image in CSS and inside this border a background image needed. I have tried border-radius:0 0 50% 50%; -webkit-border-radius:0 0 50% 50%; But not getting the required shape. Any help would be appreciated. 回答1: With Border Radius: You can give the element a different border-radius value in the X and Y axis to obtain a curved bottom side with border and a background image. .curved-border { height: 200px; width: 400px; background: url(http://lorempixel.com/400/200/nature/1); border:

Add gradient in edit text border in android

强颜欢笑 提交于 2021-02-07 10:25:42
问题 I want to add gradient only to the border of my editText , I can add gradient but it takes the entire background . How can I apply gradient only to the border , and the rest should be transparent? 回答1: Add the edittext in a layout Set gradient background color for that layout Set margin 1dp for edittext . Set white background for edittext i think now it's displays like your expectation, thank you 回答2: This one does the trick :) <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android=

How does `border-style: double` split the pixels?

China☆狼群 提交于 2021-02-07 07:46:32
问题 How does the browser decide how many pixels each of the 3 lines will get? Here are some cases that I hope will help you understand: border: 1px double black => 1,0,0 or 0,1,0 or 0,0,1 border: 2px double black => 0,2,0 or 1,1,0 or 1,0,1 border: 4px double black => 2,1,1 or 1,2,1 or 1,1,2 border: 5px double black => 2,2,1 or 2,1,2 or 1,3,1 etc. Are there any inconsistencies between browsers? I'm mostly curious about this question and would appreciate an answer from a reliable source. 回答1: From

How to change textbox border color and width in winforms?

我是研究僧i 提交于 2021-02-07 07:27:20
问题 I would like to know how do I change the border color and border width of textbox as something shown below If it is mouse hover I need to display one colour and on mouse down I need to display another colour. Can anyone explain me the detailed process with the source if available. 回答1: You could do the following: Place the TextBox inside a Panel Give the panel 1 pixel padding Set the text dock to Fill Make the text box to have no border Then, handle mouse events on the text box, switch the

How to change textbox border color and width in winforms?

时间秒杀一切 提交于 2021-02-07 07:27:18
问题 I would like to know how do I change the border color and border width of textbox as something shown below If it is mouse hover I need to display one colour and on mouse down I need to display another colour. Can anyone explain me the detailed process with the source if available. 回答1: You could do the following: Place the TextBox inside a Panel Give the panel 1 pixel padding Set the text dock to Fill Make the text box to have no border Then, handle mouse events on the text box, switch the

Applying borders to a single table cell when using border-collapse

和自甴很熟 提交于 2021-02-07 04:55:52
问题 I have a table with the following CSS rules applied: table { border-collapse: collapse; } td { border: 2px solid Gray; } I want certain cells to have a red border, instead. td.special { border: 2px solid Red; } This doesn't work as I'd expect. In FireFox 3 and IE8 it looks like this: (source: control-v.net) In IE7 Compatibility mode (Running in IE8) it looks like this: (source: control-v.net) I want all four sides of the <td> to be red. How can I do this? A test case can be found here. 回答1:

How do you apply a gradient from outer to inner, only to borders, in CSS?

喜欢而已 提交于 2021-02-05 08:00:10
问题 Based on the MDN documentation this doesn't seem to be explicitly supported. So I tried it as follows in the linked code pen below. I know the nested <div> 's are ugly as can be and don't make for a good reusable style component, but I don't know how else to approach this effect! Any guidance on what approaches to try to accomplish this would be greatly appreciated! Here is a link to a pen demonstrating my current approach: :root { --outer-battle-window-color-0: #7c7874; --outer-battle-window

Make Font Awesome icons in a circle border with right 1:1 ratio

自作多情 提交于 2021-02-05 07:36:38
问题 In some case, if the ratio of the icon is not 1:1, the border is not a circle anymore. Here's an example: I'm currently using: HTML: .socials a(href='#') <i class="fa fa-facebook"></i> a(href='#') <i class="fa fa-twitter"></i> a(href='#') <i class="fa fa-google"></i> SASS: border-radius: 50% border: solid white padding: 10px Is there anyway that I can use CSS to fix the problem? 回答1: You need to set width, height, line height, & text-align to center the icon. icon will need also vertical

How to add a border to a rectangle in Java using setBorder and JFrame

戏子无情 提交于 2021-02-05 07:15:05
问题 I am trying to add a border to a Rectangle element and for some reason it will not work, is it not compatible with JFrame ? I can set my entire JFrame to having a border, but it can't find setBorder with my rectangles. Here is my code: package trivia; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Rectangle; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.border

Bevel corners, background not rounded

纵然是瞬间 提交于 2021-02-04 21:08:47
问题 I have a figure with bevel corners, but the background is not rounded: How to have it rounded? .test-block { height: 480px; padding: 4px; color: #ffffff; background-color: transparent; background-image: -webkit-linear-gradient(top, #ffdc00, #ffdc00), -webkit-linear-gradient(225deg, #ffdc00, #ffdc00), -webkit-linear-gradient(bottom, #ffdc00, #ffdc00), -webkit-linear-gradient(left, #ffdc00, #ffdc00), -webkit-linear-gradient(315deg, transparent 9px, #ffdc00 10px, #ffdc00 12px, red 12px);