小编dan*_*man的帖子

Flash想要运行,但现场没有闪存

当我访问我之前在IE中建立的网站时,我会在浏览器底部弹出消息栏,说明该网站想要运行Flash.

这很好,除了网站上没有任何闪光的事实.

什么可能导致这个?Flash现在怎么可能在网站上?这是安全问题吗?

security flash

2
推荐指数
2
解决办法
159
查看次数

使用Jasmine测试toUpperCase

我正在尝试测试是否String.toUpperCase使用Jasmine调用该方法.然而,无论何时我尝试它只是返回

toUpperCase()方法不存在

这是我的Jasmine测试:

spyOn(String,"toUpperCase")
$(@makeup.el).trigger(@e)
expect(String.toUpperCase).toHaveBeenCalled()
Run Code Online (Sandbox Code Playgroud)

有关如何测试是否被调用的任何想法?它似乎String是window对象的私有类,所以我实际上可能无法测试它.请帮忙.

javascript coffeescript jasmine

2
推荐指数
1
解决办法
1369
查看次数

html标题级别以及何时使用它们

我为无知而道歉,但是我很难确定何时改变我在H1-H6之间的标题.我正在尝试在codeacemy.com上自学代码,我的理解是为每个标题更改标题,例如:

<h1>Introduction</h1>
  <p>This is the intro</p>

<h2>Body</h2>
  <p>This is the body</p>

<h3>Conclusion</h3>
  <p>This is the conclusion</p>
Run Code Online (Sandbox Code Playgroud)

代码学院希望我多次使用相同的标题(如下所示)是对还是错?我什么时候开始使用不同的标题?请帮助我澄清一下,这样我可以更高效地了解我编写代码的使命.

Code Academy ex:

  <h2>Ethiopia</h2>
    <p>Ethiopian beans can be divided into 3 categories: Longberry, Shortberry, and Mocha. Longberry varieties consist of the largest beans and are often considered of the highest quality in both value and flavor. Shortberry varieties are smaller. The Mocha variety is a highly prized commodity. Mocha Harars are known for their peaberry beans that often have complex chocolate, spice and …
Run Code Online (Sandbox Code Playgroud)

html

2
推荐指数
1
解决办法
65
查看次数

覆盖角材料主体排版

我已经在Angular(v 5.2.0)应用程序中使用Angular Material(v 5.2.4)创建了一个自定义主题。

我的主题.scss:

@import '~@angular/material/theming';

@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans+Condensed:300,400,500');

@include mat-core();

$my-theme-primary: mat-palette($mat-deep-orange);
$my-theme-accent:  mat-palette($mat-amber, A200, A100, A400);
$my-theme:   mat-light-theme($my-theme-primary, $my-theme-accent);
$my-typography: mat-typography-config(
  $font-family: '"IBM Plex Sans Condensed"'
);

.my-theme {
  @include angular-material-theme($my-theme);
  @include angular-material-typography($my-typography);
}
Run Code Online (Sandbox Code Playgroud)

我还将类名添加mat-app-background mat-typography到了body我的应用程序的index.html页面中。

当我将my-theme类添加到我的应用程序的容器中时body,所有的材质组件都将获得自定义字体(用于单选按钮标签等),但是组件之外的任何组件都无法获得它。

我也尝试过使用angular-material-typography()and mat-base-typography()mixins无济于事。

如何覆盖mat-typography类中的字体?

material-design angular-material angular

2
推荐指数
2
解决办法
4984
查看次数

在图像之间增加空间

如何在后面的图像中添加一些空间意味着我想要在后面的图像之间有水平空间

<p class="menusomething">In-game Imagery</br>
<a href="R.jpg"><img src="age1.jpg" width="200" height="150"/>          </a></br>
<a href="Re2.jpg"><img src="age2.jpg" width="200" height="150"/>   </a></BR>
<a href="Ri.jpg"><img src="Re3.jpg" width="200" height="150"/></a></BR>
<a href="Ri4.jpg"><img src="e4.jpg" width="200" height="150"/></a></BR>
</p>
Run Code Online (Sandbox Code Playgroud)

和CSS代码

p.menusomething{background: white;
   margin: auto;
   margin-top: 200px;
   margin-left: 10px;
   padding: 10px;
   width: 200px;}
Run Code Online (Sandbox Code Playgroud)

html css

1
推荐指数
1
解决办法
6万
查看次数

处理CSS形状和IE Doctype

我一直在研究一个涉及CSS Shapes的jQuery插件.我遇到的问题是,如果没有声明DOCTYPE,CSS形状在IE8中不起作用.这将是我的第一个jQuery插件.

我的问题:jQuery开发人员如何解决这个问题?我是否应该在文档中解释这个插件需要DOCTYPE才能工作,还是应该编写在Quirks模式下工作的单独CSS?

css jquery internet-explorer jquery-plugins quirks-mode

0
推荐指数
1
解决办法
632
查看次数

AngularJS单元测试检查是否调用了没有方法的函数

我正在使用Jasmine来测试我的Angular应用程序.如果使用类似的方法调用函数的方法,则很容易测试:

spyOn($rootScope, "$emit");
expect($rootScope.$emit).toHaveBeenCalled();
Run Code Online (Sandbox Code Playgroud)

但我无法找到一种方法来检查函数何时被调用(没有方法),例如我正在使用$anchorScroll(); 在一个控制器,我不知道在哪里将上述代码应用于这个人.我已经看到了他们使用的一些Jasmine示例expect(window.myFunction()).toHaveBeenCalled(),但这不适用于Angular的DI.

unit-testing jasmine angularjs

0
推荐指数
1
解决办法
2597
查看次数