Java - JFrame上只有两个圆角(Java - Only Two Rounded Corners on a JFrame)
我想围绕JFrame的前两个角来围绕我正在进行的项目。 我目前使用
setShape(new RoundRectangle2D.Double(0, 0, 200, 252, 30, 30));
舍入所有四个角setShape(new RoundRectangle2D.Double(0, 0, 200, 252, 30, 30));
但我不希望底部两个圆形我想要成为一个正常的角落。I would like to round the top two corners on a JFrame for a project I am currently working on. I am currently rounding all four corners using
setShape(new RoundRectangle2D.Double(0, 0, 200, 252, 30, 30));
but I do not want the bottom two rounded I want the to be a normal corner.
原文:
最满意答案
在
Firefox
检查此代码段此代码段仅适用于
Firefox
..编辑
我也创建了在
Firefox
显示的plunker,请检查一下.b4-test { padding: 50px; width: 500px; margin: 50px auto; text-align: center; background: #ccc; } .progress[value] { border-radius: 0; background-color: red; } .progress[value]::-moz-progress-bar { background-color: green; }
<div class="b4-test"> <progress class="progress" value="75" max="100">75%</progress> </div>
对于Chrome,请检查以下plunker
检查这个Chrome Plunker
Check this snippet in
Firefox
This snippet will work in
Firefox
only..Edit
I have also created plunker to show in
Firefox
please check this.b4-test { padding: 50px; width: 500px; margin: 50px auto; text-align: center; background: #ccc; } .progress[value] { border-radius: 0; background-color: red; } .progress[value]::-moz-progress-bar { background-color: green; }
<div class="b4-test"> <progress class="progress" value="75" max="100">75%</progress> </div>
For Chrome check the below plunker
check this Chrome Plunker
相关问答
更多-
如何更改自定义颜色的引导程序进度条的颜色(How can I change color of bootstrap progress bar with custom color)[2023-07-27]
使用Bootstrap 3.2.0,您可以执行以下操作: $(function() { $("#one").addClass("progress-bar-purple"); $("#two").addClass("progress-bar-orange"); }); .progress-bar-purple { background-color: purple !important; } .progress-bar-orange { background- ... -
希望这会帮助你。 ID, 'your_custom_field', true); ?>更喜欢使用JQuery $(".bar").css("width", "50%"); 或使用Javascript var bars = document.getElementsByClassName("bar"); bars[0].style.width = "50%"; Prefer using JQuery $(".bar").css("width", "50%"); or in Javascript var bars = document.getElementsByClassName("bar" ...我已经用这个博客中的代码和一个例子来描述了这一点: Android中的自定义进度条 自定义ProgressBar需要定义进度条的背景和进度的属性或属性。 在您的res->drawable文件夹中创建一个名为customprogressbar.xml的XML文件: custom_progressbar.xml