我已经在网站上看到过这种类型的动画,就在CSS3关键帧开始获得动力的时候,但是找不到它,我也不能用CSS或jQuery复制它,而这里我认为你们中的一些人可以提供帮助.
我已经设想了我希望实现的内容,并将其嵌入到下面.我相信这可以使用新的CSS3关键帧或jQuery的.animate()进行编码; 特征.我不知道.我已经尝试过我所知道的一切,但都是徒劳的.
这是我想要的GIF动画:

我刚刚注意到,http://droplr.com/在他们的主页上使用了一个非常类似的过渡,但有一些滑动效果.并且出现的数据(单词)都是随机的.我想知道这是怎么可能的!
试图在整个互联网上搜索这个错误,但都是徒劳的,所以作为最后的手段,我在StackOverflow上创建了一个问题.
我有两个简单的Eloquent模型设置:
1.教师(扩展可验证) - 因为我正在使用MultiAuth系统.
2. GeneralNotice(扩展Eloquent/Model)
app\Teacher.php
public function generalNotices()
{
$this->hasMany('App\Modules\GeneralNotice');
}
Run Code Online (Sandbox Code Playgroud)
app\Modules\GeneralNotice.php
public function teacher()
{
$this->belongsTo('App\Teacher');
}
Run Code Online (Sandbox Code Playgroud)
这是我的一般通知的迁移表:
database/migrations/***_create_general_notices_table.php
Schema::create('general_notices', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->longtext('description')->nullable();
$table->string('attachment')->nullable();
$table->integer('teacher_id')->unsigned();
$table->foreign('teacher_id')->references('id')->on('teachers');
$table->date('dated_on')->default(now());
$table->timestamps();
});
Run Code Online (Sandbox Code Playgroud)
我还在数据库中播放了一个示例通知,以检查它是否有效.
当我尝试访问任何这些关系时,我遇到了一个错误.
$teacher = Teacher::find(1);
$teacher->generalNotices;
带有消息'App\Teacher :: generalNotices的LogicException必须返回一个关系实例.'
$notice = GeneralNotice::find(1);
$notice->teacher;
带有消息'App\Modules\GeneralNotice :: teacher的LogicException必须返回一个关系实例.'
如果我尝试访问成员函数,
$teacher->generalNotices()或者
$notice->teacher()
我得到空.
请帮忙.
使用 html2canvas 和 jsPDF,我试图DIV在我的屏幕上打印一个完整的内容,我已经做到了这一点:
const printAsPdf = () => {
html2canvas(pageElement.current, {
useCORS: true,
allowTaint: true,
scrollY: -window.scrollY,
}).then(canvas => {
const image = canvas.toDataURL('image/jpeg', 1.0);
const doc = new jsPDF('p', 'px', 'a4');
const pageWidth = doc.internal.pageSize.getWidth();
const pageHeight = doc.internal.pageSize.getHeight();
const widthRatio = pageWidth / canvas.width;
const heightRatio = pageHeight / canvas.height;
const ratio = widthRatio > heightRatio ? heightRatio : widthRatio;
const canvasWidth = canvas.width * ratio;
const canvasHeight = canvas.height * ratio;
doc.addImage(image, 'JPEG', 0, …Run Code Online (Sandbox Code Playgroud) animation ×1
css ×1
eloquent ×1
gif ×1
html2canvas ×1
javascript ×1
jspdf ×1
laravel ×1
laravel-5 ×1
math ×1
photoshop ×1
php ×1
positioning ×1
transition ×1