如何设置启动按钮的样式看起来像自举按钮

时间:2020-08-17 07:05:37

标签: javascript css typescript angular-ui-bootstrap primeng

HI在以下stackblitz链接中,我有两个控件, 一个是primeng splitbutton,另一个是bootstrap按钮。

https://stackblitz.com/edit/angular6-primeng-hlxeod?file=src/app/app.component.html

我无法自定义splitbutton的宽度和颜色,以使其看起来像自举按钮。 请分享任何建议

我尝试了styleClass和内联样式,但是没有得到体现。

在我的实际应用程序中,我还有许多其他控件,因此仅使用类来控制特定的splitbutton并不是必需的

2 个答案:

答案 0 :(得分:0)

var redirUrl = Url.Action("SelectClasses", "Registration", new { id = 99 });
redirUrl = String.Concat(redirUrl, "#id152");

return Redirect(redirUrl);
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover, .btn:focus {
  text-decoration: none;
}

.btn:focus, .btn.focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn.disabled, .btn:disabled {
  opacity: 0.65;
}

.btn:not(:disabled):not(.disabled) {
  cursor: pointer;
}

.btn:not(:disabled):not(.disabled):active, .btn:not(:disabled):not(.disabled).active {
  background-image: none;
}

.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn-primary:focus, .btn-primary.focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

.btn-primary.disabled, .btn-primary:disabled {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: #0062cc;
  border-color: #005cbf;
}

.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

引导程序已应用:focus和:hover等

答案 1 :(得分:0)

所以我弄清楚了,当我将css设置为globals.scss时,它能够实现和更改css。您可以使用styleClass或class使其具有特定性,因为在dependenices.json中,样式应位于原始CSS类之后,这就是为什么它可以覆盖