我有一个角-cli应用程序和使用webpack。当我尝试运行它时,组件特定的css无法工作
styles.css
/* You can add global styles to this file, and also import other style files*/
@import 'http://something/v4/dist/css/bootstrap.min.css';
组件
@Component({
selector: 'app-carousel',
templateUrl: './carousel.component.h
我在一个Angular项目中有以下代码
<input class="form-control" type="number" [(ngModel)]="cons.failPercent" [ngModelOptions]="{standalone: true}"
mdTooltip="Typically valves can be repaired three times before they need to be replaced"
我仍然只是学习角,CSS,和HTML (这三个都是新的),所以请对我有一些耐心。
我收到了一些代码,并被赋予了修复一些格式化的任务。
以下是问题所在:
当页面第一次加载时,页面标题有一些填充。见下面左边的图片。
但是,当我导航到另一个具有以下代码的页面时:
/* Removing padding and scroll bar from main page */
::ng-deep html > body > main#app-content {
overflow-y: hidden;
padding: 0;
}
然后导航到任何其他组件/页面,填充就会消失,所有的东西
我有一个从富文本编辑器调用的函数来添加所选内容。
问题是,如果我传递html标记(如<center>some</center> ),它就不能正常工作。
它不是以内容为中心,而是输出HTML文本
function addTextAtCursorPostion(text) {
var sel, range, html;
if (window.getSelection) {
sel = window.getSelection();
if (sel.getRangeAt && sel.rangeCount) {
range = s