这更多的是辩论,而不是问题,但我觉得互联网上没有很多关于这个主题的文章。
例如,Foundation附带了数百个!important标签,这些标签在我眼中不需要它们:
.text-center { text-align: center !important; }
Run Code Online (Sandbox Code Playgroud)
有很多与此类似的css,在我看来这是不好的做法,我想回答的问题是,为什么css框架完全使用它们?Bootstrap和Foundation是两个都使用它们的主要CSS框架。
一直有人告诉我,在CSS中使用重要标记是非常不好的做法,并且仅应用于IE。
css css-frameworks twitter-bootstrap zurb-foundation cascade-framework
在 IE 11 和 IE 10 中,我在下面的行中遇到无效字符错误:
if (!plugin.$element.attr(``data-${ pluginName }``)) {
我知道这是由于不支持 ES6,但我不知道如何解决这个问题。Foundation 已经包含 babel,我认为下面的这个脚本可以解决这个问题,但没有。
return gulp.src(PATHS.javascript)
.pipe($.sourcemaps.init())
.pipe($.babel())
.pipe($.concat('foundation.js', {
newLine:'\n;'
}))
.pipe($.if(isProduction, uglify))
.pipe($.if(!isProduction, $.sourcemaps.write()))
.pipe(gulp.dest('assets/javascript'))
.pipe(browserSync.stream());
});
Run Code Online (Sandbox Code Playgroud)
这是 Foundation 中包含的foundation.core.js 文件中的一个问题。
要查看此问题,您可以导航到以下网址并在 IE 11 或 10 中加载它:http : //b20.2c7.mwp.accessdomain.com/
有没有人解决这个问题?
我试图找出一种方法,您可以在其中拥有一个索引文件,该文件在编译时将全局页眉和页脚加载到 index.html 文件中,因此我不必每次都添加它。
目前这是创建我的 index.html 文件的原因:
new HtmlWebpackPlugin({
title: 'Typescript Webpack Starter',
template: '!!ejs-loader!src/index.html'
}),
Run Code Online (Sandbox Code Playgroud)
它在正文中加载 JS,在头部加载 css,但我想知道我是否可以执行以下操作(就像模板引擎一样)
<body>
{{HEADER GETS IMPORTED HERE}}
<p>Success your page has loaded</p>
<button class="button">Button</button>
{{FOOTER GETS IMPORTED HERE}}
</body>
Run Code Online (Sandbox Code Playgroud)
让我知道你的想法
<?php while ( have_posts() ) : the_post(); ?>
<section class="panel panel-white">
<div class="row single-post-content">
<?php if ($category_name !== 'Jobs') { ?>
<h5 class="author-post__title"><?php the_author() ?></h5>
<p><?php echo get_the_date(); ?></p>
<?php }
the_content();
if ($category_name !== 'Jobs') { ?>
<div class="row author-post">
<div class="small-12 medium-4 column">
<img src="<?php echo get_avatar(); ?>" alt="" />
</div>
<div class="small-12 medium-8 column">
<h5 class="author-post__title"><?php the_author() ?></h5>
<p>
Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took …Run Code Online (Sandbox Code Playgroud)